Sign in to follow this  
Followers 0
xandout

Auto System Restore-using my gui to control things

8 posts in this topic

ok i have a GUI that i want to use to allow users to decide what programs will be installed and install accordingly when "ok" is pressed"

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("PC-Paramedix", 517, 216, 189, 115)
GUISetCursor (3)
$Checkbox2 = GUICtrlCreateCheckbox("chk_dvd", 77, 101, 17, 17)
GUICtrlSetCursor (-1, 0)
$Checkbox3 = GUICtrlCreateCheckbox("chk_avast", 77, 83, 17, 17)
GUICtrlSetCursor (-1, 0)
$Checkbox1 = GUICtrlCreateCheckbox("chk_ff", 77, 134, 17, 17)
GUICtrlSetCursor (-1, 0)
$Checkbox4 = GUICtrlCreateCheckbox("chk_java", 77, 118, 17, 17)
GUICtrlSetCursor (-1, 0)
$Label1 = GUICtrlCreateLabel("Avast!", 96, 83, 34, 17)
$Label2 = GUICtrlCreateLabel("DVD Software", 96, 102, 72, 17)
$Label3 = GUICtrlCreateLabel("Java", 97, 120, 27, 17)
$Label4 = GUICtrlCreateLabel("Fire Fox", 97, 136, 41, 17)
$Label5 = GUICtrlCreateLabel("PC-Paramedix System Restore Wizard", 32, 8, 466, 36)
GUICtrlSetFont(-1, 20, 400, 0, "MS Sans Serif")
$Checkbox5 = GUICtrlCreateCheckbox("chk_avast", 77, 150, 17, 17)
GUICtrlSetCursor (-1, 0)
$Checkbox6 = GUICtrlCreateCheckbox("chk_avast", 77, 166, 17, 17)
GUICtrlSetCursor (-1, 0)
$Label6 = GUICtrlCreateLabel("Flash Player", 97, 152, 61, 17)
$Label7 = GUICtrlCreateLabel("Adobe Reader", 97, 168, 73, 17)
$Group1 = GUICtrlCreateGroup("Applications to install", 64, 64, 209, 145)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Operations to perform", 297, 64, 209, 49)
$Checkbox7 = GUICtrlCreateCheckbox("Checkbox7", 312, 88, 17, 17)
$Label8 = GUICtrlCreateLabel("Change Windows Key", 331, 89, 109, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("ok", 296, 128, 137, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

i was thinking of writing GUICtrlRead results to a file and when i click ok my master.exe (the one that initiates each install)will run, if it reads a 1 in firefox's poswition in the text file it installs it if it reads zero it moves on to flash.exe...

help please

Edited by xandout

Share this post


Link to post
Share on other sites

Ok how can i have my script do something when i click OK?

Share this post


Link to post
Share on other sites

The more you bump your post the longer you may wait for an answer.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

bump? oh sorry the second one was just clarification on my idea. the third i should have stated i think i can write my csv and read from it but i have no idea how to start the process when i click ok.

sorry all wasnt tryin to bump.

Share this post


Link to post
Share on other sites

thanks man. i havent figured it out yet but thank you alot

Share this post


Link to post
Share on other sites

ok all i got it finally i found a help file (imagione that) that had this in it

Opt("GUIOnEventMode", 1)  ; Change to OnEvent mode 
...
$okbutton = GUICtrlCreateButton("OK", 70, 50, 60)
GUICtrlSetOnEvent($okbutton, "OKButton")
GUISetState(@SW_SHOW)

While 1
  Sleep(1000)  ; Idle around
WEnd

Func OKButton()
  ;Note: at this point @GUI_CTRLID would equal $okbutton,
  ;and @GUI_WINHANDLE would equal $mainwindow
  MsgBox(0, "GUI Event", "You pressed OK!")
EndFunc

i just edited it to suit needs and voila!

thanks for forcing me to learn this one on my own

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  
Followers 0