supadodger Posted January 19, 2009 Share Posted January 19, 2009 i want a script to pause repeatedly until clipboard changes. i have something i have to do 1800 times and i have to do part of it manually but the part after i copy to clipboard will always remain the same. so i would like to automate that part and then have it pause again. Link to comment Share on other sites More sharing options...
azure Posted January 19, 2009 Share Posted January 19, 2009 i want a script to pause repeatedly until clipboard changes.i have something i have to do 1800 times and i have to do part of it manually but the part after i copy to clipboard will always remain the same.so i would like to automate that part and then have it pause again.sounds like you should be using a loop rather than a pause.If you pause the script, it won't "look" for anything, any longer. Link to comment Share on other sites More sharing options...
Pain Posted January 19, 2009 Share Posted January 19, 2009 Simple example: $clip = ClipGet() While $clip = ClipGet() Sleep(100) WEnd MsgBox(0, "", "Clipboard has changed!") Link to comment Share on other sites More sharing options...
soulhealer Posted January 19, 2009 Share Posted January 19, 2009 (edited) $oldclip = ClipGet() While 1;this will loop it endlessly If $oldclip <> ClipGet() Then _DoSomething();run a custom function, set it whatever you want for it. Else ;;; EndIf Sleep(100) Wend Func _DoSomething() ;fill any action you need when clipboard changes EndFunc Edited January 19, 2009 by soulhealer Link to comment Share on other sites More sharing options...
supadodger Posted January 19, 2009 Author Share Posted January 19, 2009 Simple example: $clip = ClipGet() While $clip = ClipGet() Sleep(100) WEnd MsgBox(0, "", "Clipboard has changed!") but wont wont $clip change everytime the clipboard changes causing $clip to always = $clipget ? Link to comment Share on other sites More sharing options...
martin Posted January 19, 2009 Share Posted January 19, 2009 (edited) but wont wont $clip change everytime the clipboard changes causing $clip to always = $clipget ?No, because AutoIt behaves according to the previous instruction or context.$clip = ClipGet();Assignment, sets $clip to be the clipboard contentsButWhile $clip = ClipGet();boolean comparison, checks if $clip is the same as the clipboard contents without changing $clip Edited January 19, 2009 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
supadodger Posted January 19, 2009 Author Share Posted January 19, 2009 but wont wont $clip change everytime the clipboard changes causing $clip to always = $clipget ?nah i tried.i didnt give autoit enough credit.this will simplify a ton of scripts i write assuming that it wont notice the changes to my $variables without a while $variable = "BLAH" Link to comment Share on other sites More sharing options...
wolf9228 Posted January 19, 2009 Share Posted January 19, 2009 (edited) Dim $I = 0 , $X = 0 Do If $X = 0 Then $ClipGet1 = ClipGet() $X = 1 Else Sleep(100) $ClipGet2 = ClipGet() If $ClipGet1 <> $ClipGet2 Then MsgBox(0, "Clipboard", "Clipboard has changed!") $X = 0 EndIf Until $I = 1 Edited January 19, 2009 by wolf9228 صرح السماء كان هنا Link to comment Share on other sites More sharing options...
FireFox Posted January 19, 2009 Share Posted January 19, 2009 $fc = ClipGet() While ClipGet() = $fc Sleep(250) WEnd MsgBox(64, 'ClipGet', 'ClipBoard has changed !' & @CRLF & ClipGet()) Not tested. Cheers, FireFox. Link to comment Share on other sites More sharing options...
November Posted January 19, 2009 Share Posted January 19, 2009 $fc = ClipGet() While ClipGet() = $fc Sleep(250) WEnd MsgBox(64, 'ClipGet', 'ClipBoard has changed !' & @CRLF & ClipGet()) Not tested. Cheers, FireFox.Tested... works like a charm! Cheers Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
FireFox Posted January 19, 2009 Share Posted January 19, 2009 @November Im happy to have done something working without testing it Cheers, FireFox. Link to comment Share on other sites More sharing options...
November Posted January 19, 2009 Share Posted January 19, 2009 @NovemberIm happy to have done something working without testing it Cheers, FireFox. What a partnership... I'll try to be more beta tester than developer Cheers m8 Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
TerarinK Posted January 20, 2009 Share Posted January 20, 2009 Okay I see some code for a one pass but how will you see any other? All you need to accomplish this task is: GUIRegisterMsg($WM_DRAWCLIPBOARD, "WM_DRAWCLIPBOARD") Do _DoAnything() Until GUIGetMsg() = $GUI_EVENT_CLOSEoÝ÷ Úz0²)Ü{*.q©eyÖ«z¬µêÞvg¬±¨Ê§yçm¡×w¢µ«¢+ÙÕ¹5µ½]É¥Ñ ÀÌØíÍ5ÍÍôÅÕ½ÐìÅÕ½Ðì¤(U% ÑɱMÑÑ ÀÌØí¥5µ¼°ÀÌØíÍ5Í͵Àì I1°Ä¤)¹Õ¹ìôôÐí5µ½]É¥Ñ()Õ¹]5}I] 1%A =I ÀÌØí¡]¹°ÀÌØí¥5Í°ÀÌØí¥ÝAÉ´°ÀÌØí¥±AÉ´¤(5µ½]ɥѡ} ±¥Á ½É}ÑÑ ¤¤)¹Õ¹ìôôÐí]5}I] 1%A =I Yes, I know I declared two functions there but always have a side Memo for when I'm doing task, they are easily removed for the final product 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
Pain Posted January 20, 2009 Share Posted January 20, 2009 @NovemberIm happy to have done something working without testing it Cheers, FireFox.I can't really see any difference from your script and the one I posted other than that you changed the variable name and increased the sleep... Link to comment Share on other sites More sharing options...
FireFox Posted January 20, 2009 Share Posted January 20, 2009 @Pain Halala... whats the problem with autoit members ? I didnt see yours, and you dont have to reply by saying that youve written it first or something like this... i just dont care Cheers, FireFox. Link to comment Share on other sites More sharing options...
Pain Posted January 20, 2009 Share Posted January 20, 2009 I didn't mean to be rude or something, I'm sorry if that's how you got it. It's a verry basic script and only a few ways to do it (all pretty much the same anyway) so it's possible that you just didn't saw my post but it sounded like you ignored me. Link to comment Share on other sites More sharing options...
LarryDalooza Posted January 20, 2009 Share Posted January 20, 2009 There may be some clipboard "viewer" concerns that are outlined here...http://www.delphidabbler.com/articles?article=9in case you want to research it further.Lar. AutoIt has helped make me wealthy 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