tsystems Posted December 4, 2013 Posted December 4, 2013 I can't seem to find a way to have a script pause until I click somewhere and then continue running / end. Surely there is a way to do this?
l3ill Posted December 4, 2013 Posted December 4, 2013 MsgBox will do this... My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
tsystems Posted December 4, 2013 Author Posted December 4, 2013 MsgBox will do this... Sorry, I was not clear. I need to place the cursor on a specific line of text so the rest of the script will act on the text from that particular spot.
l3ill Posted December 4, 2013 Posted December 4, 2013 I dont know how that is going to work. I would love to see it though. Maybe build some functions and call them sepeartly with a hotkeyset?? Or maybe someone else has other suggestions. good luck, Bill My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
JohnOne Posted December 4, 2013 Posted December 4, 2013 Where is this "specific line of text" in what application, on what control? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
tsystems Posted December 4, 2013 Author Posted December 4, 2013 Where is this "specific line of text" in what application, on what control? The text can be random bodies of text on web pages or in email. I'd like this to work anywhere.
JohnOne Posted December 4, 2013 Posted December 4, 2013 (edited) The text can be random bodies of text on web pages or in email. I'd like this to work anywhere. Crikey! You have an enormous project on your hands then. The reason being that text is extracted differently on almost all controls, for example it's microsoft word, you need code to identify the control, extract text from it, determine if the cursor is over required text. Then do that with every application you can think of, and you're nearly there. I think flash objects and images will be your biggest hiccups. I'd never get into such a thing myself, but wish you the best of luck. Edited December 4, 2013 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
l3ill Posted December 4, 2013 Posted December 4, 2013 (edited) Aaahhh... that makes more sense now. I have several little scripts here at work that do just that. But they are not pretty or stable. Mostly just a HKS (hotkeyset) that swoops up the copied text and activates another prog and pastes and so on ..... If you are interseted I can post an example or 2 if this is actually what you are looking for. As John mentioned there is no pretty way to do this (that I know of) and that makes it hard to make a one size fits all, they have to be adapted to your specific envirnment. (what is wrong with my spell chacker?) cya, Bill p.s. come to think of it, NewSciTE in my sig is an example of such a thing.... Edited December 4, 2013 by billo My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
tsystems Posted December 4, 2013 Author Posted December 4, 2013 Thank you for your replies. I'm a little surprised that there is not a function for what I'm trying to do. It doesn't seem like such a reach. Are you and am I understanding this correctly? There is no WaitClick(3000,1) (hypothetical) It waits at this line of the script for you to click somewhere, which places the cursor in some text, times out after 3k milliseconds, and either exits or continues (0vs1) the script for example...
JohnOne Posted December 4, 2013 Posted December 4, 2013 By your description, it sounded like you want to wait until your mouse cursor is hovering over a particular word in any application.If that is not correct, then explain in better detail, using an example. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Moderators Melba23 Posted December 4, 2013 Moderators Posted December 4, 2013 tsystems,Creating something like that does not seem too difficult - press {SPACE} to start the function: #include <Constants.au3> #include <Misc.au3> Global $hDLL = DllOpen("user32.dll") HotKeySet("{ESC}", "On_Exit") HotKeySet("{SPACE}", "_WaitClick") While 1 Sleep(10) WEnd Func _WaitClick() $nBegin = TimerInit() Do If _IsPressed("01", $hDLL) Then Do Sleep(10) Until Not (_IsPressed("01", $hDLL)) Return MsgBox($MB_SYSTEMMODAL, "Return", "Mouse button pressed") EndIf Until TimerDiff($nBegin) > 3000 MsgBox($MB_SYSTEMMODAL, "Return", "Timeout") EndFunc Func On_Exit() DllClose($hDLL) Exit EndFuncHow close is that to what you want? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
tsystems Posted December 10, 2013 Author Posted December 10, 2013 Thanks! I suspect it is close but I can't get it to work. I'll have another look when I have more time.
Moderators Melba23 Posted December 10, 2013 Moderators Posted December 10, 2013 tsystems,Do you mean you cannot get it to work when incorporated into your script or that you cannot get the actual example I posted to work? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
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