rvbfreak Posted June 7, 2010 Share Posted June 7, 2010 This is a really easy question to answer probably, but how do i check if a checkbox is checked? (No, the alliteration was not on purpose ) i need to use it in an 'If' statement thanks -rj Link to comment Share on other sites More sharing options...
Yoriz Posted June 7, 2010 Share Posted June 7, 2010 From the helpfile for GUICtrlRead.For Checkbox, Radio control several states can be returned as $GUI_FOCUS and $GUI_CHECKED,. So use i.e. BitAnd(GUICtrlRead($Item),$GUI_CHECKED) to test if the control is checked. GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF. Link to comment Share on other sites More sharing options...
rvbfreak Posted June 7, 2010 Author Share Posted June 7, 2010 From the helpfile for GUICtrlRead. alirght, thanks. i didnt know how to compare the variables. this is off topic, but now autoit keeps complaining about something that does not make sense. it says ] (108) : ==> "If" statement has no matching "EndIf" statement.: EndFunc heres the code im having problems with: expandcollapse popupFunc button1() $going=1 guictrlsetdata($status,"Running") $count=1 $current=0 if BITAND(guictrlread($check1),$GUI_UNCHECKED) then Do $read=guictrlread($input1) $delay=guictrlread($input3) $curprox = _GUICTRLEDIT_GETLINE($input2, $current) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", "REG_DWORD", "1") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", "REG_SZ",$curprox) $objWMIService2 = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\CIMV2\Applications\MicrosoftIE") $colIESettings3 = $objWMIService2.ExecQuery ("Select * from MicrosoftIE_LANSettings") $nie=_IECreate($read) _IELinkClickByIndex($nie,0) sleep($delay) if $current = $count Then $current=1 else $current = $current + 1 endif If processexists("IEXPLORE.exe") then processclose("IEXPLORE.exe") endif Until $going=0 EndIf if BitAND(Guictrlread($check2),$GUICHECKED) Then $npc=0 Do $read=guictrlread($input1) $delay=guictrlread($input3) $curprox = _GUICTRLEDIT_GETLINE($input2, $current) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", "REG_DWORD", "1") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", "REG_SZ",$curprox) $objWMIService2 = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\CIMV2\Applications\MicrosoftIE") $colIESettings3 = $objWMIService2.ExecQuery ("Select * from MicrosoftIE_LANSettings") $nie=_IECreate($read) _IELinkClickByIndex($nie,0) sleep($delay) if $npc=20 then if $current = $count Then $current=1 $npc=0 else $current = $current + 1 $npc=0 endif endif If processexists("IEXPLORE.exe") then processclose("IEXPLORE.exe") endif $npc=$npc + 1 Until $going=0 EndFunc i dont get why it keeps saying the if statement has no matching endif statement. Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 7, 2010 Share Posted June 7, 2010 Paste that into SciTE and hit CTRL-t (run Tidy) and it will show you exactly where the problem is... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now