RZLucian0127 Posted November 21, 2007 Share Posted November 21, 2007 If ($chkScreen = 0 and $chkCursor = 0) Then $chk2 = 0 ElseIf ($chkScreen = 1 and $chkCursor = 1) Then $chk2 = 1 EndIf Guys please help with that code i'm so confuse in AutoIT script ^__^ pls help thanks in advance guyz.. i don't know where is the error, because it has no error message but there is no effect huhuhu Y__Y Link to comment Share on other sites More sharing options...
GEOSoft Posted November 21, 2007 Share Posted November 21, 2007 If ($chkScreen = 0 and $chkCursor = 0) Then $chk2 = 0 ElseIf ($chkScreen = 1 and $chkCursor = 1) Then $chk2 = 1 EndIf Guys please help with that code i'm so confuse in AutoIT script ^__^ pls help thanks in advance guyz.. i don't know where is the error, because it has no error message but there is no effect huhuhu Y__YMsgBox(0, "Test", "The value of $chk2 is " & CheckScreen()) Func CheckScreen() If ($chkScreen = 0 and $chkCursor = 0) Then $chk2 = 0 ElseIf ($chkScreen = 1 and $chkCursor = 1) Then $chk2 = 1 Else $chkScreen = 2 EndIf Return $chk2 EndFunc I suspect that what you are really looking for is If ($chkScreen = 0 and $chkCursor = 0) Then $chk2 = 0 Else $chk2 = 1 EndIf Or maybe If ($chkScreen = 0 and $chkCursor = 0) Then $chk2 = 0 ElseIf ($chkScreen = 1 OR $chkCursor = 1) Then $chk2 = 1 EndIf 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!" Link to comment Share on other sites More sharing options...
BrettF Posted November 21, 2007 Share Posted November 21, 2007 Lets see... $chkCursor = 0 $chkScreen = 0 $chk2 = -1 If ($chkScreen = 0 And $chkCursor = 0) Then $chk2 = 0 ElseIf ($chkScreen = 1 And $chkCursor = 1) Then $chk2 = 1 EndIf $Msg = "Case 1-" & @CRLF $Msg &= "$chkcursor = " & $chkCursor & @CRLF $Msg &= "$chkscreen = " & $chkscreen & @CRLF $Msg &= "$chk2 = " & $chk2 MsgBox (0, "", $Msg) $chkCursor = 1 $chkScreen = 1 $chk2 = -1 If ($chkScreen = 0 And $chkCursor = 0) Then $chk2 = 0 ElseIf ($chkScreen = 1 And $chkCursor = 1) Then $chk2 = 1 EndIf $Msg = "Case 2-" & @CRLF $Msg &= "$chkcursor = " & $chkCursor & @CRLF $Msg &= "$chkscreen = " & $chkscreen & @CRLF $Msg &= "$chk2 = " & $chk2 MsgBox (0, "", $Msg) Also, try having a look at the <> operators... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
GEOSoft Posted November 21, 2007 Share Posted November 21, 2007 (edited) I'm going to have to start calling you "Tricky Bert" or maybe "The Tricky Aussie". Edit: That's what you get for sleeping with my sister. Edited November 21, 2007 by GEOSoft 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!" Link to comment Share on other sites More sharing options...
BrettF Posted November 21, 2007 Share Posted November 21, 2007 I'm going to have to start calling you "Tricky Bert" or maybe "The Tricky Aussie". Edit: That's what you get for sleeping with my sister.I'm not sure which one your sister was... Was it last night or this morning... JKS! Why would you call me tricky Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
RZLucian0127 Posted November 21, 2007 Author Share Posted November 21, 2007 I'm not sure which one your sister was... Was it last night or this morning... JKS! Why would you call me tricky ehehe.. btw, thanks guyz ^__^ i got it Link to comment Share on other sites More sharing options...
GEOSoft Posted November 21, 2007 Share Posted November 21, 2007 ehehe.. btw, thanks guyz ^__^ i got itGlad to be of service sir and welcome to the land of AutoIt.BTW: Not everyone is crazy around here. I'm OK but watch out for Bert. He'll sleep with anybodys sister or the sister of a snake for that matter. 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!" Link to comment Share on other sites More sharing options...
BrettF Posted November 21, 2007 Share Posted November 21, 2007 Glad to be of service sir and welcome to the land of AutoIt.BTW: Not everyone is crazy around here. I'm OK but watch out for Bert. He'll sleep with anybodys sister or the sister of a snake for that matter.You never been close to a snake until... Woooooo! Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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