Jump to content

Fileopendialog Help!


dryper
 Share

Recommended Posts

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

$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

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

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 :D

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...