Jump to content

bobbby

Active Members
  • Posts

    22
  • Joined

  • Last visited

bobbby's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I have created a string to hex and hex to string converter. But how do I detect if it's hex and not a string? I tested with this but it fails for me sometimes. If i use a normal string. #include <string.au3> $var = string2hex("this is a simple test") $num = stringsplit($var,chr(32)) if isarray($num) and $num[0] > 0 then _run() func _run() for $i = 1 to $num[0] if stringregexp($num[$i],'[A-F0-9]{2}') == 1 Then else $i = $num[0] consolewrite("No Hex"&@crlf) EndIf Next consolewrite("No errors was found"&@crlf) EndFunc func hex2string($hex) local $str = stringsplit($hex,chr(32)) local $a if isarray($str) then if $str[0] > 0 then for $i = 1 to $str[0] $a = $a & _hextostring($str[$i]) Next return $a Else return 0 EndIf Else return 0 EndIf EndFunc func string2hex($string) local $b for $i = 1 to stringlen($string) if $i == 1 Then $b = $b & _StringToHex(stringmid($string,$i,1)) else $b = $b &" "&_StringToHex(stringmid($string,$i,1)) EndIf Next return $b EndFunc
  2. Not like that. It should start at orange and end in lightgreen. Here is how i mean, http://imgur.com/W0poB.png. Like this: ############# ############# ############# ############# Not like this: ####--------- ----####----- --------####-
  3. I don't know how i can fix so mousemove can draw from 1 point to another. Like the mousedrag method. But the mousedrag doesn't work when i do it. So i need to do this like a workaround. I'm so lost also, how should i do it? It should also draw - and then _ and go down. I use +16 because the linetool is 16 in width and height. hotkeyset("{f2}","doit") Opt("MouseClickDownDelay", 1) Opt("MouseClickDelay", 1) Opt("MouseCoordMode", 2) global $f = 0,$xx = 0 func doit() $pos = mousegetpos() global $f = 0,$xx = 0 for $i = 1 to 10 for $x = 1 to 2 mousedown("left") mousemove($pos[0]+$xx,$pos[1]+$f,1) $xx += 16 Next $f += 16 Next mouseup("left") EndFunc while 1 sleep(100) WEnd
  4. It looks like it goes really fast with a GUI created in Autoit. But i select the checkboxes in another program. Maybe that's why it's so slow. 22.000 checkboxes and for loop = 24 seconds 22.000 checkboxes without for loop = 10 seconds But I'm going to use for loop, it's the only way to use for progressbar i think. Thanks for the help
  5. Works, but it's 13 seconds more with for loop. And that's with a checklist with 10.000. I want it as fast i can get.
  6. I using "_GUICtrlListView_SetItemChecked" to select a whole list. But i want a progressbar that show when it's done. How should i do this the fastest way? I have used a for loop but that will add like +30 seconds. And if i use -1 it will go really fast. Here is what i tested with, but maybe I'm in the wrong direction. func docheck() local $diff $begin = TimerInit() ProgressOn("Progress", "") $start = _GUICtrlListView_SetItemChecked($hwnd, -1) do $diff = TimerDiff($begin) ProgressSet(int($diff /1000)) until $start == true EndFunc
  7. That looks easy, but now i have a code generator too. func codegen($o) $h = "" for $i = 1 to 15 $r = random(1,3,1) if $r = 1 Then $d = chr(random(48,57,1)) elseif $r = 2 then $d = chr(random(65,90,1)) elseif $r = 3 then $d = chr(random(97,122,1)) EndIf $h = $h & $d Next return $h EndFunc func chc($cc) $cc1 = "" $len = stringlen($cc) for $a = 1 to $len if stringisupper(stringmid($cc,$a,1)) Then $cc1 = $cc1 & stringreplace(stringmid($cc,$a,1),stringmid($cc,$a,1),"+{" & stringmid($cc,$a,1) & "}") Else $cc1 = $cc1 & stringmid($cc,$a,1) EndIf Next return $cc1 EndFunc Edit: I can send to the loginbox now. But it changes some chars to uppercase and some not. Do i need to change it to send 1 and 1, instead of a whole line? Here is the result: Fixed Code: 33+{J}h+{Z}+{I}f+{X}o+{A}u+{X}+{Q}4d Sent to the login: 33Jhzifxoauxq4d Edit1: Sent the code 1 and 1 and got this... Lower: 3 Lower: 3 Upper: +{J} Lower: h Upper: +{Z} Upper: +{I} Lower: f Upper: +{X} Lower: o Upper: +{A} Lower: u Upper: +{X} Upper: +{Q} Lower: 4 Lower: d Should be: 33JhZIfXoAuXQ4d Sent to login: 33jhzifxoauxq4d
  8. Yes i always use Autoit Window Info to find the controlID's. But this is in flash. It's a code you need to write in. It's a game you need to change the code inside. I use this: 1. Download the swf-file. 2. Upload to swf-to-exe.com, and download the exe. If i use embedded it's the same with controlsend. But it's using IE and i want to run it through Chrome/Firefox/Opera.
  9. I tried, but its change only the titlebar instead of the text. And it's flash too. So controlsend should be that method or send. And i can't get it to work with uppercase and lowercase.
  10. I use raw, but it still not send it in uppercase :/ Maybe the textinput can't accept that, or check for caps and shift keys when they are pressed?
  11. How do i make so controlsend can send passwords that is uppercase and lowercase? When i send 123456ABCabc1234567 it comes out as, 123456abcabc1234567. Why does it do that? what do i do wrong? The code comes from a settings file and puts inside a variable that sends via controlsend.
  12. I have created a script that using a game, and i want to record the mouse clicks. It's works too record and all that stuffs. But when i play the record. It's just got messed up, and looks bad. How can i fix so it doesn't look messed up? Here is the code. Maybe it's a lot messy. The program is not destroying the game. The keys F2 - Auto-Click the tools or bricks Insert - Change tools or bricks Delete - Delete the recent clicks End - Change to the Black brick Right CTRL - Record the clicks Home - Play the recent recording Here is the mouse-clicks for mario http://paste2.org/p/829506 #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=C:\hbey.ico #AutoIt3Wrapper_outfile=everybodyedit2.exe #AutoIt3Wrapper_Compression=3 #AutoIt3Wrapper_Res_Comment=wut #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_LegalCopyright=wut #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #Include <GuiStatusBar.au3> #include <IE.au3> #include <Misc.au3> #Include <File.au3> ;Options Opt("MouseCoordMode", 2) Opt("WinTitleMatchMode", 4) Opt("TrayMenuMode",1) Opt("MouseClickDelay", 9) Opt("MouseClickDownDelay", 9) $dll = DllOpen("user32.dll") filedelete("delete.log") dircreate("recorded") ;Set variables global $ho, $noh, $w, $h, $rec, $filez, $files $exit = TrayCreateItem("Exit") TraySetState() _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () $window = GUICreate("Everybody Edits", 639, 539,-1,-1,bitor($WS_VISIBLE,$WS_CLIPSIBLINGS,$WS_CLIPCHILDREN,$WS_BORDER,$WS_MINIMIZEBOX,$WS_MAXIMIZEBOX)) guisetbkcolor(0x242424) $Ac = GUICtrlCreateObj($oIE, 0, 0, 640, 520) GUICtrlSetBkColor($Ac,0x242424) GUISetState() ;Navigate to the flash _IENavigate ($oIE, "http://static.jesper.nu/games/action/everybody-edits.swf") While 1 $msg = GUIGetMsg() $msg1 = TrayGetMsg() if $msg = $GUI_EVENT_CLOSE or $msg1 = $exit then ExitLoop EndIf if WinActive("Everybody Edits","") and $noh == 1 Then $ho = mousegetpos() mouseclick("left",$ho[0],$ho[1]) EndIf if WinActive("Everybody Edits","") then ;If Insert is pressed, go + color. Till end. if _IsPressed("2D", $dll) Then $pos = mousegetpos() if $w = 22 Then mouseclick("left",439,496) mousemove($pos[0],$pos[1],0) $h = 1 $hh = 110 + $h $w = 1 Else $h += 15 $w += 1 $hh = 110 + $h mouseclick("left",$hh,496) mousemove($pos[0],$pos[1],0) EndIf While _IsPressed("2D", $dll) Sleep(10) WEnd EndIf ;If End is pressed, get the colour Black if _IsPressed("23", $dll) Then $pos = mousegetpos() mouseclick("left",440,496) mousemove($pos[0],$pos[1],0) While _IsPressed("23", $dll) Sleep(10) WEnd EndIf ;If F2 is pressed, set the variable to 1. if _IsPressed("71", $dll) Then if $noh = 1 then $noh = 0 Else $noh = 1 $ho = mousegetpos() EndIf While _IsPressed("71", $dll) Sleep(10) WEnd EndIf ;If mouse is pressed save the mouseclicks to delete.log ;If record is activated, record the mouseclicks. if _IsPressed("01", $dll) Then $pos = mousegetpos() if $rec = 1 Then filewrite(@scriptdir & "\recorded\record" & $filez & ".log",$pos[0] & " " & $pos[1] & @crlf) EndIf if $pos[1] < 487 then filewrite("delete.log",$pos[0] & " " & $pos[1] & @crlf) EndIf While _IsPressed("01", $dll) WEnd EndIf ;If Delete key is pressed, Clear the recent painting. if _IsPressed("2E", $dll) Then $lines = _FileCountLines("delete.log") mouseclick("left",135,496,1,0) for $i = 1 to $lines $post = stringsplit(filereadline("delete.log",$i)," ") mousemove($post[1],$post[2],0) mouseclick("left",$post[1],$post[2],1,2) Next filedelete("delete.log") While _IsPressed("2E", $dll) Sleep(10) WEnd EndIf ;If right CTRL is pressed, record or stop the recording. if _IsPressed("A3", $dll) Then if $rec = 1 Then $rec = 0 winsettitle("Everybody Edits","","Everybody Edits - Recording Stopped. Press Home too create it.") else winsettitle("Everybody Edits","","Everybody Edits - Recording..") $rec = 1 $Files = _FileListToArray(@scriptdir & "\recorded\", "record*.log", 1) If not @Error Then $filez = $files[0] + 1 Else $filez = 1 EndIf EndIf While _IsPressed("A3", $dll) Sleep(10) WEnd EndIf ; If Home is pressed, play the recent recording. if _IsPressed("24", $dll) Then $Files = _FileListToArray(@scriptdir & "\recorded\", "record*.log", 1) If not @Error Then $filez = $files[0] Else $filez = 1 EndIf $lines = _FileCountLines(@scriptdir & "\recorded\record" & $filez & ".log") for $i = 1 to $lines $post = stringsplit(filereadline(@scriptdir & "\recorded\record" & $filez & ".log",$i)," ") mousemove($post[1],$post[2],0) mouseclick("left",$post[1],$post[2],1,8) Next While _IsPressed("24", $dll) sleep(10) WEnd EndIf EndIf WEnd GUIDelete() Exit
  13. Ah, thanks for the help. Btw, how do i make like a function, too use many keys? Do i need to add arrays or how do i do it?
  14. How do i use this inspressed udf, too work with mouseclick counting? I don't want too use "hotkeyset". I tested this first, but got like 300 directly. It's really suck the original _ispressed(), because i don't know how to check when the key is released. #include <IsPressed_UDF.au3> global $h While 1 If _IsMouseKeyPressed() Then $h = $h +1 consolewrite($h & @crlf) EndIf WEnd
  15. Now i can click on the button, but i can't fix so it's click on the smiley.
×
×
  • Create New...