Illuvator Posted February 25, 2006 Share Posted February 25, 2006 I want to write something which runs along the lines (Old version of Autoit): IfExist, C:\\Files\\setup.exe, run, C:\\Files\\setup.exe IfExist, D:\\Files\\setup.exe, run, D:\\Files\\setup.exe IfExist, E:\\Files\\setup.exe, run, E:\\Files\\setup.exe Basically, I want to change this to something like: If("C:\\Files\\setup.exe")Then Run("C:\\Files\\setup.exe") Else *Goto13* EndIf I want to make it do the following: If C:\\Files\\setup.exe exists, then it runs the setup.exe If it does not exist i want it to go to the next one down (see script above i.e. go to the D:\\Files\\setup.exe line) and so on running through the script Is the way i have written it above (under I want to change this to something like) the right way to go about it, and if not how should i script this? Thanks in advance Illuvator Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 25, 2006 Share Posted February 25, 2006 Hi, would that already help? If FileExists("C:\Files\setup.exe") Then Run("C:\Files\setup.exe") ElseIf FileExists("d:\Files\setup.exe") Then Run("d:\Files\setup.exe") ElseIf FileExists("e:\Files\setup.exe") Then Run("e:\Files\setup.exe") EndIf So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Illuvator Posted February 25, 2006 Author Share Posted February 25, 2006 would that already help?Yes that would, thanks very much Link to comment Share on other sites More sharing options...
cppman Posted February 26, 2006 Share Posted February 26, 2006 (edited) Also, u could use functions(like gotos) If FileExists("File") then _FileExists() EndIf Func _FileExists() MsgBox(0, "", "") EndFunc Edited February 26, 2006 by CHRIS95219 Miva OS Project Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now