
asym
Active Members-
Posts
33 -
Joined
-
Last visited
Everything posted by asym
-
I was working on a script that read a .txt file line by line and then compared each line with the files in the same directory, if any file on that directory had a name that was not on the .txt file it should be deleted I managed to get the .txt to be read line by line with the FileReadLine, but I can't get it to compare with the files in the same directory and delete the files not found Any help on this?
-
So I wrote this script, but for some reason I have tried it over and over and tested it and made small adjustments and I can never get the second pixelsearch to work properly... The first pixel search works pretty well on it's own but the second one doesn't just continues de script like it hasn't found anything when it has Opt("WinTitleMatchMode",1) Opt("MouseCoordMode",0) Opt("MouseClickDelay",30) WinWaitActive ( "PWO") HotKeySet("{Esc}","Terminate") HotKeySet("{F9}", "StartScript") $script = False While 1 While $script = True Sleep(10) MouseClick("left", 47, 478, 1) Sleep(30) MouseClick("left", 47, 478, 2) Sleep(50) MouseClick("left", 47, 478, 2) Sleep(4000) $n = 0 $pixel = PixelSearch(265, 108, 450, 156, 0xFFF200) If Not @error Then SoundPlay(@WindowsDir & "\media\hallelujah.wav", 0) Do $n = $n + 1 MouseClick("left", 73, 448, 2) Sleep(500) MouseClick("left", 106, 559, 2) Sleep(500) Until $n = 100 Else Sleep(50) $pixel1 = PixelSearch(666, 158, 733, 225, 0xFFF200) If Not @error Then SoundPlay(@WindowsDir & "\media\hallelujah.wav", 0) Do $n = $n + 1 MouseClick("left", 73, 448, 2) Sleep(500) MouseClick("left", 106, 559, 2) Sleep(500) Until $n = 100 Else Sleep(10) MouseClick("left", 277, 557, 1) Sleep(150) MouseClick("left", 277, 557, 2) Sleep(10) MouseClick("left", 277, 557, 2) Sleep(500) EndIf EndIf WEnd WEnd Func StartScript() If $script = False Then $script = True ToolTip(" Press F9 to Stop",200,100,"V 1.1",1,2) Sleep(2000) ToolTip("") Else $script = False ToolTip("Press F9 to Start",200,100,"V 1.1",1,2) Sleep(2000) ToolTip("") EndIf EndFunc ;==>StartScript Func Terminate() Exit EndFunc
-
You dont need a guitar to do it Wow you even went through the trouble of installing the trial version, wow, I am deeply thankful for what you have done so far... I wish this forum had a reputation system so I could give you positive reputation What you did first is exactly what I need, I already tested it, it moves exactly how I want and in the area I want I just need it to do exactly the same thing but while pressing the left mouse button as I need to have it pressed to drag the Wah pedal bar in Guitar rig... I tried using the MouseDown("left") thing in your code but it doesn't work well maybe Im placing the code in the wrong place. Its a really "rudimentary" way of doing it but it works as a wah pedal and It would be really useful for me because it would enable me to record stuff with the wah pedal in my computer instead of going through the trouble of having to buy one of those 500$+ guitar to computer interfaces
-
Bump
-
It may seem pretty strange or whatever you wanna call it lol I have guitar rig 4 for PC and I have my guitar pluged to the PC, I want to simulate a wha pedal, guitar rig as a thing that does it but I have to click with the mouse and I think you agree with me that it's not very "handy" to play the guitar and move you mouse at the same time So I am trying to simulate it using the Space bar and use the keyboard as a wha pedal for my guitar lol... I recorded a video with camtasia http://tinypic.com/player.php?v=30jmxhw&s=7 It seems to be a bit laggy but I think you get the point
-
Sorry for the bump... And I was almost sure I did say it in the first post, now that I checked again I see I didnt :/ my bad... Can you help me with it? I was around it like 1 hour yesterday messing with the MouseDown thingy and couldn't figure how to make it work properly
-
Could you help me with this clicking issue? I still couldnt solve it
-
Thank you, Neverming I was being lazy lol, I read the code and actually understood it in 1 min But I am having issues with the clicking part, I need it to always hold the "left mouse key" I tried with the MouseDown, but while going to Point 2 it's moving really irregular, well the mouse in the screen seems to be moving OK, but what I am actually trying to move seems like it's having seizures from right to left... So it's pressing down but actually really in a really irregular way... Can you help me with this? RIght now it's like this #Include <Misc.au3> Opt("WinWaitDelay", 100) Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 0) Opt("PixelCoordMode", 0) HotKeySet("{SPACE}","somefunc") HotKeySet("{ESC}","Exiting") $direction = True $zero_pos = 622 $count_pos = 0 $yy = 440 While 1 If _IsPressed("20") Then If $direction = True Then MouseMove($zero_pos+$count_pos,$yy,0) MouseDown("left") $count_pos += 1 If $count_pos+1 > 300 Then $direction = False Else MouseMove($zero_pos+$count_pos,$yy,0) $count_pos -= 1 If $count_pos -1 < 0 Then $direction = True EndIf Else $direction = True Select Case $count_pos > 150 And $count_pos < 300 $count_pos += 1 MouseMove($zero_pos+$count_pos,$yy,0) Case $count_pos < 150 And $count_pos > 0 MouseMove($zero_pos+$count_pos,$yy,0) $count_pos -= 1 MouseUp("left") EndSelect EndIf Sleep(10) WEnd Func somefunc() EndFunc Func Exiting() Exit EndFunc
-
This one worked well but I needed the same key for the mouse to move towards the point 2 or towards the point 1 Sure it is strange at least makes us think a bit... it's one of those things that could really make my day If I could accomplish it Well your script worked wonders at least on a blank window, but Im having trouble changing the "origin" point, I messed around with the $zero_pos but still can't get the y coordinate This one repeatedly moved to point 2, It's not really what I wanted Thanks all 3 of you... Im still trying to figure it out, the 2nd script seems to do the job, now Im just trying to make it do the job "where" I want it , if you could throw a little help bogQ I would appreciate Again, thanks for your time... I haven't worked with autoit for months now and I couldn't really find a way to do it...
-
. I did a simple graphic in paint of what I intend to do for easier understanding I tried to do it myself, this is what I came to Obviously it doesn't work as I intended thats why I am asking for your help I couldn't come with a way to do it starting from where it stopped being pressed and that stuff as explained in the image While $script = True If _IsPressed("20", $dll) Then MouseMove(622, 439) MouseDown("left") MouseMove(850, 440) MouseMove(622, 439) MouseUp("left") EndIf WEnd A million thanks to who can help me with this
-
Sorry for the delay... The number is a kind of a dynamic text... Its like a counter but its in text format you can copy it like you usually do
-
Is it possible to make a script that reads or copies or does something to a text data and is able to analyze it like OCR Im taling about copying a number from a webpage and analyze it and if its < X it does a designed action, because the number is something like a counter and its allways changing but its "copy able"
-
Thanks... Your tips were great Didnt get COnsoleWrite to work tho, So I had to use SEND
-
If you could give an example later I would appreciate it very much
-
So What I want to do is... Having a txt file with a bunch of lines like asjfhaoi fsafasf gdsgsd and having a variable URL like www.mydomain.com/?(THE TXT FILE LINES HERE) And I wanted the program to write in my address bar (I know how to code this one ) each URL and type enter Example Write www.mydomain.com/?asjfhaoi in addres bar and enter Write www.mydomain.com/?fsafasf and so on... Until the txt file was over... I hope you can help me
-
Well I already tried help about his before but now I did a bit of research and found the way its done in other languages but not in auto it... Is it possible to send packets through an open socket? I also think I have to hook the process/application I want before I can send the packets
-
Wow I had a quick look at your code and your tips and just by adding While 1 the main code/loop I posted before WEnd In the main loop, everything now works perfectly... I can start stop when I want and the desired tooltips appear without any other code between the main loop... I must have forgot this code line because I had it in previous versions of my script thats why it worked and now it wasnt working... Thanks for all your help and time spent
-
Thanks for your help... Still I didnt manage to get it to work properly... A strange thing I detected is that I can only start the script by clicking F9 while this tooltip ToolTip("Press F9 to Start/Stop Script",300,100,"ZPoB",2,2) is showing If I click F9 after the tooltip disapears (5 seconds later) I cant start the script at all... The "lot of code" I was talking about is below... Can you show me or give me an example how can I integrate that thing of calling $script while its doing the loop so I can stop and start the script? And the whole loop takes on average 5 seconds, and about 2 mins if the pixelsearch found the defined colour... While $script = True Sleep(10) MouseClick("left", 47, 478, 1) Sleep(10) MouseClick("left", 47, 478, 1) Sleep(3000) $n = 0 $pixel = PixelSearch(265, 101, 820, 246, 0x00ff00) If Not @error Then SoundPlay(@WindowsDir & "\media\hallelujah.wav", 0) Do $n = $n + 1 MouseClick("left", 73, 448, 2) Sleep(500) MouseClick("left", 106, 559, 2) Sleep(500) Until $n = 100 Else Sleep(10) PixelSearch(265, 101, 820, 246, 0xFFF200) If Not @error Then SoundPlay(@WindowsDir & "\media\hallelujah.wav", 0) Do $n = $n + 1 MouseClick("left", 73, 448, 2) Sleep(500) MouseClick("left", 106, 559, 2) Sleep(500) Until $n = 100 Else Sleep(10) MouseClick("left", 277, 557, 1) Sleep(150) MouseClick("left", 277, 557, 1) Sleep(10) MouseClick("left", 277, 557, 1) Sleep(200) EndIf EndIf WEnd Btw, I wish this forum had reputation system... I want to give you all that helped me good reputation but I cant because theres no system
-
Yes it has some loops and a lot of other things inside... So how can I change the code to allow it to start/Stop thee script even while the main loop is working?
-
yeah thats what had the most changes but anyway can that affect the result or functionality of the rest of the script (mainly func startscript) ?
-
So I have this script with a func startscript and it used to work fine but now I can only start the script and cant stop it later HotKeySet("{F9}", "StartScript") $script = False ToolTip("Press F9 to Start/Stop Script",300,100,"ZPoB",2,2) Sleep(5000) ;So we have time to read it ToolTip("") ;Remove the ToolTip While $script = True a lot of code here WEnd Func StartScript() ;functions are normally placed last, make it easier to browse the code If $script = False Then $script = True ToolTip("Script is now Runing | Press F9 to Stop",200,100,"ZPoB",1,2) Sleep(2000) ToolTip("") Else $script = False ToolTip("Script is now Stoped | Press F9 to Start",200,100,"ZPoB",1,2) Sleep(2000) ToolTip("") EndIf EndFunc ;==>StartScript And I only can start the script while the first tooltip is active after that I cant anymore... Any help with this? It used to work fine but not now :S
-
wow thanks a lot Allways learning
-
So I have this form and want autoit to write in a ini file the content entered in the input box and the result of the 3 checkboxes (if its checked or not) But for some reason its not writing the correct values in the ini file... What am I doing wrong? And what is the default result for checkboxes to say if they are checked or unchecked and how can I write that on a ini file? Not even the delay... and thats number on a input box ... its not writing anything as it should on the ini file $Form1 = GUICreate("Form1", 210, 191, 297, 322) $del = GUICtrlCreateInput("", 96, 40, 97, 21) $cb1 = GUICtrlCreateCheckbox("1", 8, 112, 97, 17) $cb2 = GUICtrlCreateCheckbox("2", 8, 136, 97, 17) $cb3 = GUICtrlCreateCheckbox("3", 8, 160, 97, 17) $Velocidade = GUICtrlCreateLabel("Velocidade:", 8, 40, 84, 24) GUICtrlSetFont(-1, 12, 800, 0, "Myriad Pro Light") $Label1 = GUICtrlCreateLabel("(Recomendado 3000 - 5000ms)", 8, 64, 190, 20) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Label2 = GUICtrlCreateLabel("Titulo", 8, 88, 171, 24) GUICtrlSetFont(-1, 12, 800, 0, "Myriad Pro Light") $bt1 = GUICtrlCreateButton("Save", 104, 128, 75, 25, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $delay=GUICtrlRead ( $del,0 ) $cbr1=GUICtrlRead ( $cb1,0 ) $cbr2=GUICtrlRead ( $cb2,0 ) $cbr3=GUICtrlRead ( $cb3,0 ) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $bt1 IniWrite("C:\Users\username\Desktop\myfile.ini", "section1", "Delay", $delay) IniWrite("C:\Users\username\Desktop\myfile.ini", "section1", "1", $cbr1) IniWrite("C:\Users\username\Desktop\myfile.ini", "section1", "2", $cbr2) IniWrite("C:\Users\username\Desktop\myfile.ini", "section1", "3", $cbr3) Exit EndSwitch WEnd Oh and I also want it to when I click the Save button to create the ini (even overwriting it it already exists) and close the form... Is it right? Cuz I had some doubts about that (Case $bt1 thingy)
-
But wont that script search for the 2nd color only if the 1st was found? I want it to find any of the 2 colors it doesnt matters if it doesnt find one...
-
Ok... SO I wanna make a pixel search I already did one for 1 colour... But I want the pixel search to search for 2 colours, I dont need the coordinates of the colours I just need it to search for the 2 colours and if it finds at least one of them it does some defined action... Is it possible?