t0ddie Posted February 20, 2005 Share Posted February 20, 2005 i couldnt find anything in the help file on this, i looked under comments lastly, where i still could not find it. GUICtrlSetData($mylist," SET ONE|" & "key1: " & $i & "-" & $j & "-" & $k & "-" & $l & _ "|key2: " & $m & "-" & $n & "-" & $o & "-" & $p & "|") what im trying to do, is create in a list 4 lines at a time, the last is blank. it should look like this. SET ONE key1: xxxx-xxxx-xxxx-xxxx key2: xxxx-xxxx-xxxx-xxxx when i add to the list, it works the first time just fine. but i add to it again, and it looks like this. SET ONE SET ONE key1: xxxx-xxxx-xxxx-xxxx key1: xxxx-xxxx-xxxx-xxxx key2: xxxx-xxxx-xxxx-xxxx key2: xxxx-xxxx-xxxx-xxxx ill try to leave this post without too many questions, because otherwise they might not all get answered. but im having all kinds of other problems, i can only enter the set by pressing enter when focus is on the button, clicking the button removes focus from it. the script in the example file i used as a template, that one works fine, i must have ommitted something important. interestingly enough as well, the scroll bar when you create a list larger than the listbox... doesnt scroll when i drag it with the mouse. i havent tried the arrow keys but.. now that i think about it, also when i click the input boxes they dont get focus. i have to tab to them, i cannot click to them. but mainly right now im wondering about the "|" and how to use it properly. i tried using a @crlf in the lines of the listbox but instead of going to the next line, it just made a strange character instead. well, thanks for reading. ill be drinking a beer Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
jpm Posted February 20, 2005 Share Posted February 20, 2005 i couldnt find anything in the help file on this, i looked under comments lastly, where i still could not find it.GUICtrlSetData($mylist," SET ONE|" & "key1: " & $i & "-" & $j & "-" & $k & "-" & $l & _ "|key2: " & $m & "-" & $n & "-" & $o & "-" & $p & "|")what im trying to do, is create in a list 4 lines at a time, the last is blank.it should look like this.SET ONE key1: xxxx-xxxx-xxxx-xxxx key2: xxxx-xxxx-xxxx-xxxxwhen i add to the list, it works the first time just fine. but i add to it again, and it looks like this.SET ONE SET ONE key1: xxxx-xxxx-xxxx-xxxx key1: xxxx-xxxx-xxxx-xxxx key2: xxxx-xxxx-xxxx-xxxx key2: xxxx-xxxx-xxxx-xxxxill try to leave this post without too many questions, because otherwise they might not all get answered.but im having all kinds of other problems, i can only enter the set by pressing enter when focus is on the button, clicking the button removes focus from it. the script in the example file i used as a template, that one works fine, i must have ommitted something important.interestingly enough as well, the scroll bar when you create a list larger than the listbox... doesnt scroll when i drag it with the mouse. i havent tried the arrow keys but..now that i think about it, also when i click the input boxes they dont get focus. i have to tab to them, i cannot click to them.but mainly right now im wondering about the "|" and how to use it properly.i tried using a @crlf in the lines of the listbox but instead of going to the next line, it just made a strange character instead.well, thanks for reading. ill be drinking a beer<{POST_SNAPBACK}>If you do as in the doc example you can find the solution to your problem.The key is only one entry with the same value can be added by GuiCtrlSetData unless you terminate your entry with "|".Try to remove the "|" you will see what I mean. Link to comment Share on other sites More sharing options...
t0ddie Posted February 20, 2005 Author Share Posted February 20, 2005 im using it like a @crlf how do i make a new line? Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
jpm Posted February 21, 2005 Share Posted February 21, 2005 im using it like a @crlfhow do i make a new line?<{POST_SNAPBACK}>it is not a question of new line but a new entry.each time you set a new entry by GuiCtrlSetData it will be included as a new entry which correspond for you as a new line. But it is really a new entry.Multiple entries can be set by separating them with "|" in the same call.GuiCtrlSetData($list,"a|b|c") will set 3 entries.what is show in the example is you can still add new entries which are identicals (see the add button) provided you end with "|"I don't know what you try to implement but put example of what is wrong with your script and I we will try to help you Link to comment Share on other sites More sharing options...
t0ddie Posted February 22, 2005 Author Share Posted February 22, 2005 (edited) im trying to do something like this... run it and see the multiple problems i have lol expandcollapse popup#include <GUIConstants.au3> $GUI = GUICreate("la la land",560,440) $set = 0 $a = 0 $b = 0 $c = 0 $d = 0 $e = 0 $f = 0 $g = 0 $h = 0 GUICtrlCreateLabel ("ENTER THE", 10, 235, 120,20) GUICtrlCreateLabel ("CD KEY HERE:", 10, 250, 120, 15) $d1 = GUICtrlCreateInput ( "", 140, 240, 30, 20) $d2 = GUICtrlCreateInput ( "", 175, 240, 30, 20) $d3 = GUICtrlCreateInput ( "", 210, 240, 30, 20) $d4 = GUICtrlCreateInput ( "", 245,240, 30, 20) $x1 = GUICtrlCreateInput ( "", 140, 280, 30, 20) $x2 = GUICtrlCreateInput ( "", 175, 280, 30, 20) $x3 = GUICtrlCreateInput ( "", 210, 280, 30, 20) $x4 = GUICtrlCreateInput ( "", 245, 280, 30, 20) guictrlsetlimit($d1,4) guictrlsetlimit($d2,4) guictrlsetlimit($d3,4) guictrlsetlimit($d4,4) guictrlsetlimit($x1,4) guictrlsetlimit($x2,4) guictrlsetlimit($x3,4) guictrlsetlimit($x4,4) GUICtrlCreateLabel ("ENTER SECOND", 10, 275, 120, 20) GUICtrlCreateLabel ("CD KEY HERE:", 10, 290, 120, 15) GUICtrlCreateLabel ("CD KEY SETS LOADED:", 333, 235, 120,15) GUICtrlCreateLabel (" 0", 460, 235, 13,15) $add=GUICtrlCreateButton ("Add Set To List", 165, 315, 85) $mylist=GUICtrlCreateList ("", 333,270,200,130) GUICtrlSetLimit(-1,200) $clear=GUICtrlCreateButton ("Clear Last Set", 333, 400, 75) $install=GUICtrlCreateButton ("Install Keys", 464,400,70) GUISetState () $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select case $msg = $add $i = GUICtrlRead($d1) $j = GUICtrlRead($d2) $k = GUICtrlRead($d3) $l = GUICtrlRead($d4) $m = GUICtrlRead($x1) $n = GUICtrlRead($x2) $o = GUICtrlRead($x3) $p = GUICtrlRead($x4) $set = $set + 1 $a = 0 $b = 0 $c = 0 $d = 0 $e = 0 $f = 0 $g = 0 $h = 0 GUICtrlSetData($mylist," SET " & $set & ":") GUICtrlSetData($mylist," KEY: " & $i & "-" & $j & "-" & $k & "-" & $l) GUICtrlSetData($mylist,"EX KEY: " & $m & "-" & $n & "-" & $o & "-" & $p) GUICtrlSetData($d1,"") GUICtrlSetData($d2,"") GUICtrlSetData($d3,"") GUICtrlSetData($d4,"") GUICtrlSetData($x1,"") GUICtrlSetData($x2,"") GUICtrlSetData($x3,"") GUICtrlSetData($x4,"") $msg = 0 case $msg = $clear GUICtrlSetData($mylist,"") Case $msg = $install MsgBox(0,"", "the closing button has been clicked",2) Exit EndSelect $var1 = stringlen (GuiCtrlRead($d1)) $var2 = stringlen (GuiCtrlRead($d2)) $var3 = stringlen (GuiCtrlRead($d3)) $var4 = stringlen (GuiCtrlRead($d4)) $var5 = stringlen (GuiCtrlRead($x1)) $var6 = stringlen (GuiCtrlRead($x2)) $var7 = stringlen (GuiCtrlRead($x3)) $var8 = stringlen (GuiCtrlRead($x4)) If $var1 = 4 And $var2 = 4 And $var3 = 4 And $var4 = 4 _ And $var5 = 4 And $var6 = 4 And $var7 = 4 And $var8 = 4 And Not ControlCommand($GUI,"",$add,"IsEnabled") Then GuiCtrlSetState($add, $GUI_ENABLE) ElseIf $var1 <> 4 And $var2 <> 4 And $var3 <> 4 And $var4 <> 4 And $var5 <> 4 And _ $var6 <> 4 And $var7 <> 4 And $var8 <> 4 And ControlCommand($GUI,"",$add,"IsEnabled") Then GuiCtrlSetState($add, $GUI_DISABLE) EndIf If $var1 = 4 And $var2 = 4 And $var3 = 4 And $var4 = 4 _ And $var5 = 4 And $var6 = 4 And $var7 = 4 And $var8 = 4 And Not ControlCommand($GUI,"",$clear,"IsEnabled") Then GuiCtrlSetState($clear, $GUI_ENABLE) ElseIf $var1 <> 4 And $var2 <> 4 And $var3 <> 4 And $var4 <> 4 And $var5 <> 4 And _ $var6 <> 4 And $var7 <> 4 And $var8 <> 4 And ControlCommand($GUI,"",$clear,"IsEnabled") Then GuiCtrlSetState($clear, $GUI_DISABLE) EndIf If $var1 = 4 And $var2 = 4 And $var3 = 4 And $var4 = 4 _ And $var5 = 4 And $var6 = 4 And $var7 = 4 And $var8 = 4 And Not ControlCommand($GUI,"",$install,"IsEnabled") Then GuiCtrlSetState($install, $GUI_ENABLE) ElseIf $var1 <> 4 And $var2 <> 4 And $var3 <> 4 And $var4 <> 4 And $var5 <> 4 And _ $var6 <> 4 And $var7 <> 4 And $var8 <> 4 And ControlCommand($GUI,"",$install,"IsEnabled") Then GuiCtrlSetState($install, $GUI_DISABLE) EndIf If $var1 = 4 and $a = 0 Then send("{tab}") $a = 1 EndIf If $var2 = 4 and $b = 0 Then send("{tab}") $b = 1 EndIf If $var3 = 4 and $c = 0 Then send("{tab}") $c = 1 EndIf If $var4 = 4 and $d = 0 Then send("{tab}") $d = 1 EndIf If $var5 = 4 and $e = 0 Then send("{tab}") $e = 1 EndIf If $var6 = 4 and $f = 0 Then send("{tab}") $f = 1 EndIf If $var7 = 4 and $g = 0 Then send("{tab}") $g = 1 EndIf If $var8 = 4 and $h = 0 Then send("{tab}") $h = 1 EndIf Wend it loses focus and you cant enter anything after the first set is entered. also, i want it to make a list of the sets, as so when you enter one in there you will see what i mean Edited February 22, 2005 by t0ddie Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
t0ddie Posted February 24, 2005 Author Share Posted February 24, 2005 been a couple days, anyone out there? just wondering if anyone can take a look at this. the code above wont let me add a second entry into the list. and i have to use enter when the button is in focus to use it. clicking it does nothing. Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. 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