Sign in to follow this  
Followers 0
Hyflex

Cant get a file to run...

2 posts in this topic

Why in= the script below doesnt it load up PreCast.exe wen i press home, i want precast to load and the current program to close

Help pls...

Global $Paused = False


HotKeySet("{HOME}", "Start")
Opt('MouseClickDelay', 0)


$PreCast = IniRead(@ScriptDir&"scripts\config\Config.ini", "Scripts" , "PreCast" , "0")


While 1
    Sleep(10)
WEnd



Func Start()
        While 1
If $PreCast = "1" Then
Run( "PreCast.exe", @ScriptDir&"scripts")
Sleep(10)
EndIf
    Exit
        WEnd
EndFunc

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Run('c:\path\to\the\file.exe')

edit - btw, if the way you had it would work, you'd be missing a slash since @ScriptDir doesn't have a trailing slash (ex: Run(@ScriptDir & '\file.exe'))

Edited by xcal

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0