Jump to content
Sign in to follow this  
dryper

Fileopendialog Help!

Recommended Posts

dryper

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

Share this post


Link to post
Share on other sites
eynstyne

$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]

Share this post


Link to post
Share on other sites
Helge

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)

Share this post


Link to post
Share on other sites
dryper

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

Share this post


Link to post
Share on other sites
Helge

Faen du skremte meg...forventet ikke at du ville snakke norsk :) Uansett, null problem.

Share this post


Link to post
Share on other sites
dryper

Faen du skremte meg...forventet ikke at du ville snakke norsk :D Uansett, null problem.

Bøø :)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.