Jump to content

Recommended Posts

Posted (edited)

Howdy,

I have a gui with an inputbox & a browse button which you can select your exe file. The browse works great. When you try save it to a ini by hitting the save button, nothing happens no ini file? If you dont use the browse button and hit save it will write the ini file.

CODE
GUICreate("Test", 550, 550)

$exe = GUICtrlCreateInput("exe here", 200, 420, 220, 20)

$browsebutton = GUICtrlCreateButton("Browse", 130, 420, 70, 20)

$savebutton = GUICtrlCreateButton("Save", 130, 450, 70, 20)

GUISetState()

While 1

$msg = GUIGetMsg()

Select

Case $msg = -3

ExitLoop

Case $msg = $browsebutton

$var = FileOpenDialog("", "C:\", "(*.exe)")

GUICtrlSetData ($exe, $var)

Case $msg = $savebutton

Iniwrite("test.ini","test","test",GUICtrlRead ($exe));<- Doesnt work after browse button is used? Will work if browse is not used?

EndSelect

WEnd

GUIDelete()

Edited by 1nsan1ty
Posted (edited)

Howdy,

I have a gui with an inputbox & a browse button which you can select your exe file. The browse works great. When you try save it to a ini by hitting the save button, nothing happens no ini file? If you dont use the browse button and hit save it will write the ini file.

CODE
GUICreate("Test", 550, 550)

$exe = GUICtrlCreateInput("exe here", 200, 420, 220, 20)

$browsebutton = GUICtrlCreateButton("Browse", 130, 420, 70, 20)

$savebutton = GUICtrlCreateButton("Save", 130, 450, 70, 20)

GUISetState()

While 1

$msg = GUIGetMsg()

Select

Case $msg = -3

ExitLoop

Case $msg = $browsebutton

$var = FileOpenDialog("", "C:\", "(*.exe)")

GUICtrlSetData ($exe, $var)

Case $msg = $savebutton

Iniwrite("test.ini","test","test",GUICtrlRead ($exe));<- Doesnt work after browse button is used? Will work if browse is not used?

EndSelect

WEnd

GUIDelete()

Work fine for me:

GUICreate("Test", 550, 550)
$exe = GUICtrlCreateInput("exe here", 200, 420, 220, 20)
$browsebutton = GUICtrlCreateButton("Browse", 130, 420, 70, 20)
$savebutton = GUICtrlCreateButton("Save", 130, 450, 70, 20)
GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = -3
ExitLoop
Case $msg = $browsebutton
$var = FileOpenDialog("SELECT",@ScriptDir,"Exe (*.exe)",1)
GUICtrlSetData ($exe, $var)
Case $msg = $savebutton
Iniwrite("test.ini","test","test",GUICtrlRead ($exe));<- Doesnt work after browse button is used? Will work if browse is not used?
EndSelect
WEnd
GUIDelete()
Edited by Andreik

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
×
×
  • Create New...