Jump to content
Sign in to follow this  
Zanaj

A wild problem apeared - Button click

Recommended Posts

Zanaj

Daaang thought I had it this time o-o...

I tried google and I am using Koda :DD!...Sat the "onclick" to Notify and under the case $New (Which is my the value my button is saved in) Smacked stuff in the from a previous post and it won't even give me a Msgbox D: ...

Code:

;Gui making
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 306, 167, 192, 124)
$RandomList = GUICtrlCreateList("", 8, 8, 121, 149)
GUICtrlSetData(-1, "TrashCanStuff|Whatever|Bishes")
$New = GUICtrlCreateButton("New Path", 136, 16, 163, 25)
$Start = GUICtrlCreateButton("Start", 136, 128, 163, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
;Making a new
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $New
$Path=IniRead("Option.Ini","info", "Path", "")
$ScreenR=IniRead("Option.Ini","info", "ScreenRelu", "")
$Trashcan=IniRead("Option.Ini","info", "TrashCan", "")


[url="http://www.autoitscript.com/autoit3/docs/functions/MsgBox.htm"][i][color="#000080"]MsgBox[/color][/i][/url]([color="#004040"]0[/color],[color="#008080"]""[/color], [color="#5a5a5a"]$Path[/color])
[url="http://www.autoitscript.com/autoit3/docs/functions/MsgBox.htm"][i][color="#000080"]MsgBox[/color][/i][/url]([color="#004040"]0[/color],[color="#008080"]""[/color], [color="#5a5a5a"]$ScreenR[/color])
[url="http://www.autoitscript.com/autoit3/docs/functions/MsgBox.htm"][i][color="#000080"]MsgBox[/color][/i][/url]([color="#004040"]0[/color],[color="#008080"]""[/color], [color="#5a5a5a"]$Trashcan[/color])
InstallValues()

Case $Start
InstallValues()
EndSwitch
WEnd

Btw sorry for spamming the forum...

But I really want to get this to work (: !

Thanks again guys I really love you!

This forum is amazing~

Zanaj/Nicki - The Fighting Newbie for Autoit!

Share this post


Link to post
Share on other sites
water

You have to While 1/WEnd loops. Because the script never leaves the first 1 (except when you exit the script) you never get to the second one.

You have to pack all your code into the first loop.

Please check the wiki. There are very good tutorials describing how to use GUIs.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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  

×