ciffer Posted January 15, 2008 Share Posted January 15, 2008 (edited) Hi!I am trying to make a bot that looks for pixels colors and such but i cant finish my work because of this error:CODE...Func szukaj() MsgBox(0, "", "Umieść kursor nad danym kolorem i naciśnij ENTER") Kolor() $opis=">.<" $kolor_hex=hex($kolor) GuiCtrlCreateListViewItem($kolor & '|' & $kolor_hex & '|' & $opis, $lista)EndFunc...And error is:D:\Documents and Settings\User\Pulpit\Skrypt\Centrum.au3 (22) : ==> Variable used without being declared.: $kolor_hex=hex($kolor) $kolor_hex=hex(^ ERRORAnd if i will temporarily delete 'k$olor_hex' var and change it to '$kolor' it makes another error:D:\Documents and Settings\User\Pulpit\Skrypt\Centrum.au3 (21) : ==> Variable used without being declared.: GuiCtrlCreateListViewItem($kolor & '|' & $kolor & '|' & $opis, $lista) GuiCtrlCreateListViewItem(^ ERRORFunction 'Kolor' and '$kolor' var works fine for sure. So can anyone help me? T_T Edited January 15, 2008 by ciffer Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 15, 2008 Share Posted January 15, 2008 Is $kolor a local varible within one of you functions? If so, it is only visible to code running inside that function, not in the szukaj() function. 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...
ciffer Posted January 15, 2008 Author Share Posted January 15, 2008 (edited) I will check this out and post the result @edit Gimme a hug man @_@ It works like i wanted it to Beer for you @edit 2 Is there anything that i can do to save contents of list? Some button or such ;p Edited January 15, 2008 by ciffer Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 15, 2008 Share Posted January 15, 2008 I will check this out and post the result @editGimme a hug man @_@It works like i wanted it to Beer for you @edit 2Is there anything that i can do to save contents of list? Some button or such ;pIf you are still talking about your $kolor variable, just declare it Global near the top of the script (outside of any function). Then the value will be, well... Global. 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...
ciffer Posted January 15, 2008 Author Share Posted January 15, 2008 Yeah i did it and it works just as i wanted ;] But when i close script i lose all the records in list, so i want to save it somehow... but im a total newbie " Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 15, 2008 Share Posted January 15, 2008 Yeah i did it and it works just as i wanted ;] But when i close script i lose all the records in list, so i want to save it somehow... but im a total newbie "You could save it to an ini file with IniWrite().You could save it to another file with FileWrite() or FileWriteLine().You could save it to a registry key with RegWrite().You could spend a little time reading the help file and trying out the example scripts for all the above... 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...
ciffer Posted January 15, 2008 Author Share Posted January 15, 2008 Another 3 beers for you Tnx for help and sorry for kinda dumb questions ._. 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