goldenix Posted June 15, 2008 Share Posted June 15, 2008 (edited) Shouldnt this write to console only once? Instead it keeps on writing to console Hidden,Hidden,Hidden..etc. $btn1_ADD_state = 'Visible' While 1 Sleep(1000) If $btn1_ADD_state = 'Visible' Then $btn_ADD_state = 'Hidden' ConsoleWrite($btn_ADD_state & @CRLF) EndIf WEnd Edit Thanx Verox Edited June 15, 2008 by goldenix My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
James Posted June 15, 2008 Share Posted June 15, 2008 Shouldnt this write to console only once? Instead it keeps on writing to console Hidden,Hidden,Hidden..etc. $btn1_ADD_state = 'Visible' While 1 Sleep(1000) If $btn1_ADD_state = 'Visible' Then $btn_ADD_state = 'Hidden' ConsoleWrite($btn_ADD_state & @CRLF) EndIf WEndIt's doing what you told it to do. Your setting the state back to hidden after checking it's visible. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Verox743 Posted June 15, 2008 Share Posted June 15, 2008 (edited) That sends it to console every second try this: $btn1_ADD_state = 'Visible' $sendedstat = "false" While 1 Sleep(1000) If $btn1_ADD_state = 'Visible' Then $btn_ADD_state = 'Hidden' If $sendedstat == "false" Then $sendedstat = "true" ConsoleWrite($btn_ADD_state & @CRLF) EndIf EndIf WEnd edited the code... now it works and just sends 1x hidden sorry i forgot sdomething in there Edited June 15, 2008 by Verox743 Started with AutoIt on 12th June, 2008. Link to comment Share on other sites More sharing options...
Verox743 Posted June 15, 2008 Share Posted June 15, 2008 nope thats no bug look at your second code at the $btn_ADD_state = 'Hidden' ConsoleWrite($btn_ADD_state & @CRLF) you forgot the 1s at the end of $btn it should be $btn1_ADD_state = 'Hidden' ConsoleWrite($btn1_ADD_state & @CRLF) Started with AutoIt on 12th June, 2008. 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