Ooops
March 05, 2021, 06:44:56 AM

Author Topic: [bb] Application Directory by fredborg [ 1+ years ago ]  (Read 491 times)

Offline BlitzBot

[bb] Application Directory by fredborg [ 1+ years ago ]
« on: June 29, 2017, 12:28:41 AM »
Title : Application Directory
Author : fredborg
Posted : 1+ years ago

Description : People often encounter problems when they make their final executables, and start them from a shortcut on the desktop or similar.

This will solve those problems!

Add it as the first thing in your code, and you're home free.


Code :
Code: BlitzBasic
  1. ; Path to executable
  2. Global apppath$ = SystemProperty$("appdir")
  3. If Lower$(Right$(apppath$,4))="bin"
  4.         ; Running from the IDE
  5.         apppath$ = CurrentDir$()
  6. End If
  7. If Right$(apppath,1)<>"" Then apppath = apppath+""
  8. ChangeDir(apppath)


Comments :


Picklesworth(Posted 1+ years ago)

 I was looking for that just a few days ago.Thanks!


erbbysam(Posted 1+ years ago)

 neat stuff... I always run into this when I create an exeacutable packed setup file and then install and realise that the program doesn't know where to run from....Thanks


nawi(Posted 1+ years ago)

 Thank you very much


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal