Search the Community
Showing results for tags 'Mouse'.
-
Using standard _IsPressed function. Quick and dirty. #include <Misc.au3> Opt("MouseClickDownDelay", 0) Opt("MouseClickDownDelay", 0) Opt("MouseClickDragDelay", 0) HotKeySet("+{ESC}", "Terminate") Global $click = False ; variable to keep if mouse left still pressed (for drag&drop) Global $pos01[2]=[-1,-1] ; drag start position / left click position Global $pos02[2]=[-1,-1] ; drop end position while 1 if (_IsPressed(01)) Then ; left mouse click if (not($click)) Then ; if not clicked = first click $pos01 = MouseGetPos() ; record position $click = True ; mouse is clicked Sleep(1) EndIf While _IsPressed("01") ; while left mouse clicked, just repeat Sleep(1) WEnd EndIf $pos02 = MouseGetPos() ; get end position If ($pos01[0]<>$pos02[0]) or ($pos01[1]<>$pos02[1]) And ($pos01[0]<>-1) and ($pos01[1]<>-1) Then ; compare start / end positions, at least 2 different = drag&drop ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : Drag & drop from ' & $pos01[0] & "x" & $pos01[1] & " to " & $pos02[0] & "x" & $pos02[1] & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console $pos01[0]=-1 ; reset all values $pos01[1]=-1 $pos02[0]=-1 $pos02[1]=-1 $click = False EndIf If ($pos01[0]=$pos02[0]) and ($pos01[1]=$pos02[1]) And ($pos01[0]<>-1) and ($pos01[1]<>-1) Then ; compare start / end positions, if equal = left click ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : Click at ' & $pos01[0] & "x" & $pos01[1] & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console $pos01[0]=-1 ; reset all values $pos01[1]=-1 $pos02[0]=-1 $pos02[1]=-1 $click = False EndIf sleep(1) wend Func Terminate() MsgBox(0, "End", "End", 2) Exit EndFunc
-
@Jos Is it possible that #Au3Stripper_Ignore_Funcs and #Au3Stripper_Ignore_Variables are currently broken (in the beta)? Asking because I can not strip my script at all when using MouseOnEvent.au3 which includes those ignore directives.
-
Hi Here is a UDF which has the much requested hotkeys for mouse clicks. Autoit's hotkeyset doesn't support mouse clicks. one of the main differences with AHK (i think). ; This UDF extends AutoIT HotKeySet by adding the much requested Mouse Button Clicks ; HotKeySet (autoIT) only does KEYBOARD ; HotKeySetEx Does both KEYBOARD and MOUSE! simple interface HotKeySetEx("{RCLICK}", "myfun") ; Right Click mouse hot key HotKeySetEx("{RDCLICK}", "myfun") ; Right double click mouse hot key HotKeySetEx("{F1}", "myfun") ; normal hot key ; new function call replaces @HotKeyPressed ; getLastHotKey() = eg {RCLICK} or {F1} See MouseTrapEvent for supported events. ; single clicks ; LClick - left button click (Primary) ; MClick - middle button click (Wheel click) ; RClick - right button click (Secondary) ; XClick1 - Xtra button 1 click (usually 'back navigaton') ; XClick2 - Xtra button 2 click (usually 'forward navigaton') ; double clicks ; LDClick - left button (Primary) ; MDClick - middle button (Wheel click) ; RDClick - right button (Secondary) ; XDClick1 - Xtra button 1 (usually 'back navigaton') ; XDClick2 - Xtra button 2 (usually 'forward navigaton') ; psuedo double clicks ('chords') - ; XClick12 - Xtra button 1&2 pressed at the same time. ; ; OTHER EVENTS you'll have to work out yourself eg mouse wheel scroll - see code. This UDF is based on MouseTrapEvent which is based on MouseSetEvent. New events for scroll and drag could be added see MouseTrapEvent code. enjoy Version two fixed left and middle double, click. Note there is a bug if you set a double click, you should set a single click as it get blocked (my apols). HotKeySetExV2.zip HotKeySetEx.zip
-
This UDF allows to set an events handler for Mouse device. The beginning... I searched for a way to disable the Mouse Primary click, and be able to call some function when the click event is received... Big thanks to amel27 for this one, i only organized the whole stuff to UDF style. Example: #include <GUIConstantsEx.au3> #include "MouseOnEvent.au3" HotKeySet("{ESC}", "_Quit") _Example_Intro() _Example_Limit_Window() Func _Example_Intro() MsgBox(64, "Attention!", "Let's set event function for mouse wheel *scrolling* up and down", 5) ;Set event function for mouse wheel *scrolling* up/down and primary button *down* action (call our function when the events recieved) _MouseSetOnEvent($MOUSE_WHEELSCROLLDOWN_EVENT, "_MouseWheel_Events") _MouseSetOnEvent($MOUSE_WHEELSCROLLUP_EVENT, "_MouseWheel_Events") _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "_MousePrimaryDown_Event") Sleep(3000) ;UnSet the events _MouseSetOnEvent($MOUSE_WHEELSCROLLDOWN_EVENT) _MouseSetOnEvent($MOUSE_WHEELSCROLLUP_EVENT) _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT) ToolTip("") MsgBox(64, "Attention!", "Now let's disable Secondary mouse button up action, and call our event function.", 5) _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT, "_MouseSecondaryUp_Event", 0, 1) Sleep(5000) _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT) ToolTip("") EndFunc Func _Example_Limit_Window() Local $hGUI = GUICreate("MouseOnEvent UDF Example - Restrict events on specific window") GUICtrlCreateLabel("Try to click on that specific GUI window", 40, 40, 300, 30) GUICtrlSetFont(-1, 12, 800) GUICtrlCreateLabel("Press <ESC> to exit", 10, 10) GUISetState() _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "_MousePrimaryDown_Event", $hGUI) ;A little(?) bugie when you mix different events :( ;_MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT, "_MouseSecondaryUp_Event", $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $GUI_EVENT_PRIMARYDOWN MsgBox(0, "", "Should not be shown ;)") EndSwitch WEnd _MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT) ;_MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT) EndFunc Func _MouseWheel_Events($iEvent) Switch $iEvent Case $MOUSE_WHEELSCROLLDOWN_EVENT ToolTip("Wheel Mouse Button (scrolling) DOWN Blocked") Case $MOUSE_WHEELSCROLLUP_EVENT ToolTip("Wheel Mouse Button (scrolling) UP Blocked") EndSwitch Return $MOE_BLOCKDEFPROC ;Block EndFunc Func _MousePrimaryDown_Event() ToolTip("Primary Mouse Button Down Blocked") Return $MOE_BLOCKDEFPROC ;Block EndFunc Func _MouseSecondaryUp_Event() ToolTip("Secondary Mouse Button Up Blocked") EndFunc Func _Quit() Exit EndFunc Available Events Constants: ------------------------------------------ CHANGELOG: Download: Attached: MouseOnEvent_2.4.zip Old version: MouseOnEvent.zip - v2.3 MouseOnEvent_2.1.zip MouseOnEvent_2.0.zip MouseOnEvent_UDF_1.9.zip MouseSetOnEvent_UDF_1.8.zip MouseSetOnEvent_UDF_1.7.zip MouseSetOnEvent_UDF_1.6.zip MouseSetOnEvent_UDF_1.5.zip MouseSetOnEvent_UDF_1.4.zip MouseSetOnEvent_UDF_1.3.zip Previous downloads: 146 + 200 + 804 MouseOnEvent.zip MouseOnEvent.zip
-
I have a weird problem with a ToolTip function. It seems that I can't reliably remove a tooltip from the screen if I originally created it by setting a tooltip text via variable, not a straight up string. Here's a simple script that I used for testing: After I remade the script into this, it started working just fine (stopped working after I fixed the array comparison): Basic idea of the script: You press F1 and a tooltip with some useful info shows up by the mouse cursor. It follows the cursor around until you press F1 again, then it copies the info to the clipboard and hides the tooltip. It almost seems like if I created a tooltip using a variable to set the text, then ToolTip("") most of the times just repeats the previous use of ToolTip function. If you try to add Sleep(1000) before ToolTip("") in the first draft of the script, you'll see what i mean (if it works the same for everyone, that is). Is this a bug or am I doing something wrong?
-
Update: Download the latest version here. As my first stab at GUI scripting, I'm trying to write a simple graphical interface for Grep for Windows. I have a basic GUI, but I'm stuck on one point and nothing I've tried so far works. The sticking point is that while the Tab key works to move focus from one input control to the next, clicking the mouse on any but the first input does nothing. This seems like a basic feature of GUI functionality that should work out of the box (like Tab), but clearly I'm missing something. I tried (among many other things) Melba23's technique in the post below, but this doesn't do what I'm after -- getting the left click to set the insertion point for user input. Would greatly appreciate a pointer or two. 😉 Here's my code so far: ; Grep for Windows -- GUI [CLD] #include <AutoItConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> Opt("WinTitleMatchMode", -2) #cs FileInstall("X:\nix\search1.ico", @TempDir & "\search1.ico") FileInstall("X:\nix\grep.exe", @TempDir & "\grep.exe") FileInstall("X:\nix\sed.exe", @TempDir & "\sed.exe") FileInstall("X:\nix\libiconv2.dll", @TempDir & "\libiconv2.dll") FileInstall("X:\nix\libintl3.dll", @TempDir & "\libintl3.dll") FileInstall("X:\nix\pcre3.dll", @TempDir & "\pcre3.dll") FileInstall("X:\nix\regex2.dll", @TempDir & "\regex2.dll") #ce ; $sDefFs = @ScriptDir & "\.txt" $sOut = "" $iX = 20 $iY = 20 $hgGGrep = GUICreate("Grep for Windows: Simple TeXT search", 600, 600) GUISetState(@SW_SHOW, $hgGGrep) ; Obtain value of control: GUICtrlRead() ; left, top, width, height ; $iX, $iY, $iX + n, $iY + m ; $hgIco = GUICtrlCreateIcon(@ScriptDir & "\search1.ico", $iX, $iY, 10) $hgGL0 = GUICtrlCreateLabel("Enter a string or regular expression" & @CRLF & "(space between words means ""OR"")", $iX + 50, $iY, 250, 30) $hgSch = GUICtrlCreateInput("", $iX + 50, $iY + 40, 325, 20, $GUI_SS_DEFAULT_INPUT, -1) $hgXyZ = GUICtrlCreateCheckbox("cAsE-sEnSiTiVe", $iX + 50, $iY + 65, -1, -1) $hgExe = GUICtrlCreateButton("Search", 400, $iY + 40, -1, -1) $hgFL1 = GUICtrlCreateLabel("Filespec", $iX + 50, $iY + 100, 250, 20) $hgFs1 = GUICtrlCreateInput("d:\path\*.txt", $iX + 110, $iY + 100, 250, 20, $GUI_SS_DEFAULT_INPUT, -1) $hgFL2 = GUICtrlCreateLabel("Filespec", $iX + 50, $iY + 120, 250, 20) $hgFs2 = GUICtrlCreateInput("", $iX + 110, $iY + 120, 250, 20, $GUI_SS_DEFAULT_INPUT, -1) $hgFL3 = GUICtrlCreateLabel("Filespec", $iX + 50, $iY + 140, 250, 20) $hgFs3 = GUICtrlCreateInput("", $iX + 110, $iY + 140, 250, 20, $GUI_SS_DEFAULT_INPUT,-1) $hgOut = GUICtrlCreateEdit($sOut, 25, 190, 550, 400, $ES_LEFT, -1) GUICtrlSetState($hgSch, $GUI_FOCUS) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd ; #cs _WinAPI_SetFocus(ControlGetHandle("Grep for Windows", "", $hgSch)) _WinAPI_SetFocus(ControlGetHandle("Grep for Windows", "", $hgFs1)) _WinAPI_SetFocus(ControlGetHandle("Grep for Windows", "", $hgFs2)) _WinAPI_SetFocus(ControlGetHandle("Grep for Windows", "", $hgFs3)) #ce Thanks in advance.
-
Hi guys, I've written a script that will move my mouse to a location on the screen whenever my remote access software becomes active, the problem I have is that as soon as the remote access software becomes active it appears to capture the mouse and keyboard so nothing happens when I use MouseMove(). Is there any way around this? Thanks!
-
Hey, all. I've been looking for a way to change cursor colour but not the cursor itself. I've been looking for a couple hours now and can't find anything. I also don't even know where to start, if anyone has any tips or examples please comment them. Thanks
-
I have a situation where the desktop is designed in java swings. The nodes JTree is not allowing me to do checkbox selection using "spacebar". I am able to navigate through the nodes using up, down arrow and a tab. When I reach to the desire node selection, mouse left click is not working due a flaw a JTree core. However since it is selected, if mouse cursor auto moved to the position of the selection and send a "click" then it should be solved. Any ideas much appreciated. the problem with having fixed coordinates are the main windows is divided to 2panels where right panel containing this JTree can be expanded or shrink-ed.
-
Hello, I have a Logitech MX500 mouse, this has 7 buttons plus a wheel. I am trying to figure out how to detect clicks on three of the buttons on this mouse but have been unable to do so. I am not running any Logitech software just the standard Windows 7 driver. The buttons are all working fine but when I try to figure out which button was clicked unable to detect three of the buttons. Using this code snippet I am able to see all the button presses with the exception of these three marked by '?'. Is there some alternate method for detecting button clicks? I have been searching for example but have yet to find anything. Thanks... #include <Misc.au3> Dim $a While 1 For $a = 1 To 100 If _IsPressed($a) Then ConsoleWrite("you pressed " & $a & @CRLF) Next WEnd
-
In my work place they blocked the application movemouse. so y decided to do one by myself , to cheat the system. I have used some peaces of code from another scripts I have, and also I have found in this forum Hope this helps $version="0.2" #include <Misc.au3> If _Singleton(@ScriptName, 1) = 0 Then ; allow only one instance MsgBox(0, "Warning", "An occurence of " & @ScriptName & " is already running") Exit EndIf #region tray icon #NoTrayIcon Opt("TrayIconHide", 0) Opt("TrayMenuMode", 1) TraySetToolTip("Ratoner "& $version) Local $exititem = TrayCreateItem("Exit") TraySetState(1) ; Show the tray menu. #endregion #region variables $BlockScreensaver=1 $flagMouse=1 $MouseNotMovedCounter=0 $posMouseMovedX=0 $posMouseMovedY=0 $Counter= 0 #endregion #region main Local $hTimer = TimerInit() while 1 $Counter=$Counter+1 if $Counter>1000 then CheckifMouseMove() if $MouseNotMovedCounter>2 then moveMouse() $Counter= 0 endif Switch TrayGetMsg() Case $exititem exit EndSwitch sleep(50) wend #endregion #region functions func CheckifMouseMove() ;~ ConsoleWrite("+CheckifMouseMove()" & @crlf) $posMouseMoved = MouseGetPos() if $posMouseMovedX<>$posMouseMoved[0]or $posMouseMovedY <> $posMouseMoved[1] then $posMouseMovedX=$posMouseMoved[0] $posMouseMovedY=$posMouseMoved[1] $MouseNotMovedCounter=0 ;~ ConsoleWrite('>$MouseNotMovedCounter = ' & $MouseNotMovedCounter & @crlf ) Else ;$MouseMoved=0 $MouseNotMovedCounter=$MouseNotMovedCounter+1 ;~ ConsoleWrite('--$MouseNotMovedCounter = ' & $MouseNotMovedCounter & @crlf ) endif EndFunc func moveMouse() ;~ ConsoleWrite("+moveMouse" & @crlf) Local $posMouse = MouseGetPos() $flagMouse=$flagMouse*-1 Local $new_y = $posMouse[1] + $flagMouse ; + (10*$flagMouse) MouseMove($posMouse[0],$new_y) $MouseNotMovedCounter=0 ;~ ConsoleWrite("+mouseMove $MouseNotMovedCounter" & $MouseNotMovedCounter & @crlf) endfunc #endregion
-
Hi guys! I'm really new to AutoIT, and I have little experience with scripting or any sort of programming. But I'm trying to learn! Right now, what I'm trying to do is make a quick script that repeats a few functions while a key is held down. I want to see if I can make a quick-burst script that might work in Fallout 4 with machine guns #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep(100) If _IsPressed("01", $dll) Then MouseDown("left") Sleep(320) MouseUp("left") Sleep(25) EndIf WEnd DllClose($dll) Right now, when I hold down my left mouse button, it just repeats the script once - then I have to release and hold again to enable it again. Is it possible to to start it from the top and basically just repeats itself while I'm holding down my mouse button? In advance, thank you!
-
Searching inside the forum, I don't succeed to get any explanation about a strange (for me !) phenomena: Using AutoIt, I have coded a "cortex of neurons Simulator" for which I handle several neurons activity (Action Potential and Postsynaptic Potential) which take a long time, about 20 ms per neuron to be processed. This is why I need a global loop running about 1s for a global cortex of 50 neurons. But when I move the mouse (in any direction, like rotating above the GUI) the speed of the loop increase significantly : around x8 times more ... ! This happens only if the GUI has the focus. I did a check with the "Windows Task Manager" where I can see the CPU usage changing every time the mouse is moving (growing from 3% to 15%). I believe to remember some lecture about the influence of the user events regarding the "Application" capability to anticipate user actions by changing it's rate of pooling events, but I'm not sure it was in an AutoIt forum, or maybe it was in an other "developer forum" (like "Code Project", "Stackoverflow" , or ...? Could somebody help me to understand this behaviour ? If possible, is there a programmatic method to manage the speed of a simple "For, Next" loop ? I try to change the Application priority (setting to level 4 with "ProcessSetPriority"), but this seems not very efficient .... Thanks, Alain. FYI: I'm using : Autoit 3.3.14.2 Windows 7 Home Premium Service Pack 1 Computer ASUS N56V Screen resolution: 1920x1080 (recommended) Theme :Windows Classic
-
Hi everyone Can someone guide me to the right direction with this question? I need a simple example for getting the mouse coordinates and other input events (using api calls, not mousegetpos) on a console window (return the x and y cell) https://msdn.microsoft.com/en-us/library/windows/desktop/ms684239(v=vs.85).aspx UDF link where I get the code from: https://github.com/MattDiesel/au3-console/blob/master/Console.au3 A c++ example that does exactly what i'm looking for: https://msdn.microsoft.com/en-us/library/windows/desktop/ms685035(v=vs.85).aspx The code in the attachments helps a lot but I don't quite understand it, what code of it is necessary and is there a way more 'simple/less code' way to do this (like the c++ example) Thanks, TheAutomator test.au3
-
Hi I was searching for a while now and didn't find anything regarding this: Is there a function that returns the "number" of the monitor where the mouse is currently on screen? The same number that appears when you open windows-resolution and click on "identify" (or something). I want to trigger an event when the number changes. I wrote something that recognizes leaving the main monitor. But I couldn't get any further than that (maybe with _WinAPI_EnumDisplayMonitors/Devices/Settings ?) and I wouldn't catch an event, if someone has 3 monitors (aligned 1--2--3 with 1 being main monitor) and changes from 2 to 3. Here is my code: The GUI was just for testing. Maybe you can give me some hints :)?
-
Hi All, I'm trying to run a script to fire when a pixel at a certain location on the screen changes to a particular colour, however auinfo is unable to measure the colour where my cursor is due to my high resolution - 2560x1440 on a 13.3" laptop. Does anyone have a workaround or a fix for this? If I move my mouse to the bottom-right corner of the screen auinfo reports the mouse position as about 1280x720, 1/2 my actual resolution. Thanks!
- 21 replies
-
- high
- resolution
-
(and 3 more)
Tagged with:
-
Hello to all autoit coders, I'm not a pro dev but I've recently made a few automatisation programs. I met a program SplashTop which allows user to control their PC from android phone and play games through it (e.g. Skyrim or any other game with first person camera). The program is perfect but it's totally missing one thing - mouse move. It only allows mouse click&drag as user moves their finger on the touch screen.I was thinking about using physical phone keyboard <>^(and down) to mouse move but not many ppl have got qwerty phones such motorola droid 4 or similar and I can transfer <>^ into mousemove. The question is if any of you know a way to disable mouse click&drag and convert it into mousemove. Thanks for responses, I'm sorry but I can't make paragraphs on mobile version
-
This script is intended to allow the user to move their mouse to the edge of their screen and have the mouse appear to the opposite end. When the user drags the mouse to the edge of a monitor there is a 300 millisecond delay before the mouse will wrap. This will give the user some time to change their mind and give some time for the taskbar to open if the user has it set to autohide. When the user drags a window or selection rectangle to the edge of a monitor the user will have 700 milliseconds to take advantage of the Windows 7 Snap feature. If the user has not moved the mouse from the edge within that time then the window will move to the opposite edge. When the user holds down the mouse wheel the wrap effect is disabled. Tested on Windows 7 x64 with two monitors placed horizontally. Updates: MouseWrap.zip - Source works on latest AutoIt beta. Includes an exe. downloads: 197
-
Dear all, I'm creating this program where the goal is to automate some mouse -click and dragging on an external application. Now the problem is, this external application is blocking every automate mouse moves, clicks or anything related to using the mouse. So I figured autoit uses postmessage and user32.dll to move the mouse and that this application blocks these attempts. Now I'm wondering if there's a different way to move the mouse so it'll go undetected by this external app. Any other suggestions are welcome to. Thnx in advance
- 2 replies
-
- mouseclickdrag
- mousemove
- (and 5 more)
-
Hi These example apps can be used to lock the keyboard and mouse (useful for test automation). I've also included a Toddler/Child Lock app which lets them press some keys A-Z and 0-9 and move the mouse and plays a sound. Its uses BlockInputEx UDF Most example ALT+ESC to end enjoy KeyBoardMouseLock.zip
-
I have a basic script that takes the mouse input on a button like so: Local $msg, $Button, $GUIhandle, $response = "" $GUIhandle = GUICreate("example", 680, 575) $Button = GUICtrlCreateButton("example", 260, 5, 30) While 1 $msg = GUIGetMsg() If $msg = $Button Then ExampleFunct() ExitLoop EndIf If $response <> "" Then msgbox(0, "", $response) EndIf Wend Func ExampleFunct() $response = "respond" EndFunc Yet, If I kill this program and start it up after hitting the button with the left click 2-3 times, I will start it again and it will click the button on its own (like its buffered).
-
So i borrowed this code and made some adjustments to fit my needs. Basically i am wanting to mimic the main windows cursor and create a duplicate cursor at a different location of the monitor. So on code line 18, "ToolTip("^", $mouse[0] + GUICtrlRead($xDistanceInput) - 100, $mouse[1] + GUICtrlRead($yDistanceInput))" i want that to be a transparent PNG image. That image will be a cursor image #include <Misc.au3> HotKeySet("{ESC}", "_exit") $mouse = MouseGetPos() $xDistanceInput = GUICtrlCreateInput("", 128, 0, 49, 21) $yDistanceInput = GUICtrlCreateInput("", 128, 24, 49, 21) _secondMouse() While 1 Sleep(10) WEnd Func _secondMouse() While 1 Sleep(5) $mouse = MouseGetPos() ToolTip("^", $mouse[0] + GUICtrlRead($xDistanceInput) - 100, $mouse[1] + GUICtrlRead($yDistanceInput)) If _IsPressed("01") Then _mouseClick() If _IsPressed("78") Then ;HotKeySet{F9} ToolTip("") ExitLoop EndIf WEnd EndFunc ;==>_secondMouse Func _mouseClick() ToolTip("") MouseUp("left") MouseMove($mouse[0] + GUICtrlRead($xDistanceInput), $mouse[1] + GUICtrlRead($yDistanceInput), 0) MouseDown("left") Sleep(50) MouseUp("left") MouseMove($mouse[0], $mouse[1], 0) ToolTip("^", $mouse[0] + GUICtrlRead($xDistanceInput), $mouse[1] + GUICtrlRead($yDistanceInput)) EndFunc ;==>_mouseClick Func _exit() Exit EndFunc ;==>_exit
-
How to set a value to the "Join the discussion…" textarea and then simulate a left mouse click of the "Post as {USERNAME}" button on the Disqus thread in my blog? Here is the URL of my blog: http://professionalserver.tk/php/wp/hello-world/ If my blog got slow, just wait a while before contributing to this topic! But before you can see the "Post as {USERNAME}" button on the comment system in that blog, you must first manually sign in with Disqus!
-
I'm having a hard time trying to set a value in a specific JavaScript textarea... And I think, this is the right time.. Is it possible to set a value in the "Join the discussion…" textarea and simulate the mouse click of the "Post as {USERNAME}" button of the web page that have added a Disqus forum? If they are possible then: How can I set a value in the "Join the discussion…" textarea? And how to simulate the mouse click of the "Post as {USERNAME}" button? Note: Before you can see the "Post as {USERNAME}" button, you must be sign in with Disqus first! This is the (NULL) previous test work that I've done: #include <IE.au3> $oIE = _IECreate("http://professionalserver.tk/php/wp/hello-world/", 0, 1, 1, 0) Sleep(10000) $disqus_thread = $oIE.document.getElementById("disqus_thread") $textarea = $disqus_thread.getElementsByClassName("textarea").innerHTML = "Example Message" _IELinkClickByText($oIE, "Post as") Here is my test blog that have a Disqus thread: http://professionalserver.tk/php/wp/hello-world/ Here is the other web page that have it: http://www.voicesofyouth.org/es/posts/oneminutesjr---syria-my-love- Here is the other one: http://comercioexterior.gob.ec/min-rivadeneira-participo-en-evento-experience-ecuador-love-life-en-dubai/ And also make sure that the script will also work in any page that have a Disqus thread..