dryper Posted January 16, 2007 Share Posted January 16, 2007 Hello i making a autorunner that is gonna run Silkroad when they press on a button called "Run Silkroad" i want them to choose the silkroad.exe file from a Fileopendialog but then im stuck... i dont know how to save that setting or how to make it run after i have pressed "Open" on the Fileopendialog sceen.. could anyone help me? make an example? anything Link to comment Share on other sites More sharing options...
eynstyne Posted January 16, 2007 Share Posted January 16, 2007 $file = FileOpendialog("Open file...","","all files (*.*)") if @error = 1 then return run($file) This should do it F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent] Link to comment Share on other sites More sharing options...
dryper Posted January 16, 2007 Author Share Posted January 16, 2007 $file = FileOpendialog("Open file...","","all files (*.*)") if @error = 1 then return run($file) This should do it Hmmm will this save the work? so i dont need to do the same again and again Link to comment Share on other sites More sharing options...
Helge Posted January 16, 2007 Share Posted January 16, 2007 Check this out... For info on how to customize the different functions hit the helpfile. $sINI = @ScriptDir & "\settings.ini" $sFile = IniRead($sINI, "settings", "file", "") ; If no file specified, ini isn't found, key isn't found, bleh bleh bleh.. If $sFile = "" Then $sFile = FileOpenDialog("", "", "Executables (*.*)") If @error Then Exit ; Save selected file to INI... IniWrite($sINI, "settings", "file", $sFile) EndIf ; Execute selected/ini-read file Run($sFile) Link to comment Share on other sites More sharing options...
dryper Posted January 16, 2007 Author Share Posted January 16, 2007 Check this out... For info on how to customize the different functions hit the helpfile. $sINI = @ScriptDir & "\settings.ini" $sFile = IniRead($sINI, "settings", "file", "") ; If no file specified, ini isn't found, key isn't found, bleh bleh bleh.. If $sFile = "" Then $sFile = FileOpenDialog("", "", "Executables (*.*)") If @error Then Exit ; Save selected file to INI... IniWrite($sINI, "settings", "file", $sFile) EndIf ; Execute selected/ini-read file Run($sFile) Takk helgee skillz har du vertfall Link to comment Share on other sites More sharing options...
Helge Posted January 16, 2007 Share Posted January 16, 2007 Faen du skremte meg...forventet ikke at du ville snakke norsk Uansett, null problem. Link to comment Share on other sites More sharing options...
dryper Posted January 16, 2007 Author Share Posted January 16, 2007 Faen du skremte meg...forventet ikke at du ville snakke norsk Uansett, null problem.Bøø 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