Jump to content

Recommended Posts

 

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

 

 

Share this post


Link to post
Share on other sites

This is not any game automation. It'd be a fulfiller of the perfection of the SplashTop program (something like Teamviewer) so I can play First person offline games on my PC through my phone. (I leave the PC on and I play through screen share). The tool is not going to automate anything. It should change the mouse input (mouse click&drag into mousemove).

Share this post


Link to post
Share on other sites

This is not any game automation. It'd be a fulfiller of the perfection of the SplashTop program (something like Teamviewer) so I can play First person offline games on my PC through my phone. (I leave the PC on and I play through screen share). The tool is not going to automate anything. It should change the mouse input (mouse click&drag into mousemove).

Share this post


Link to post
Share on other sites

This is not any game automation. It'd be a fulfiller of the perfection of the SplashTop program (something like Teamviewer) so I can play First person offline games on my PC through my phone. (I leave the PC on and I play through screen share). The tool is not going to automate anything. It should change the mouse input (mouse click&drag into mousemove).

Share this post


Link to post
Share on other sites

You know AutoIT is AUTOMATION, right?

​No it isn't. It's just like if you say that C++ is Windows hacking language. Automating is a part of AutoIt and this is not the case where I'm going to automate things. Btw the automation rule is here because of online-games automation which is unfair compared to people who play with their hands. I'm not going to automate a game and it's not even an online game.

Edited by knucklesCZ

Share this post


Link to post
Share on other sites

I've never said C++ is Windows hacking language. I don't even use winblows so I wouldn't know.

You can cheat in offline games too ;)

Share this post


Link to post
Share on other sites

Well it seems like you can't get over the thing that I'm playing games on my PC or idk. Let's simplify the question then:

Hi guys, does anybody of you know how to change mouse click&drag into mousemove by a AutoIt script? Thanks.

Edited by knucklesCZ

Share this post


Link to post
Share on other sites

Okay I'll answer now.

 

I don't know how powerful AU3 is now, I don't know what screen-size your phone is using. When you click somehow make AutoIT release the hold and track from FROM x,y to the TO x,y and make AU point to the TO.

Mind you, you'll probably get lag in any of the concepts if it's being tunnels over Teamviewer, will be better with VNC with a really good latency.

Share this post


Link to post
Share on other sites

Okay I'll answer now.

 

I don't know how powerful AU3 is now, I don't know what screen-size your phone is using. When you click somehow make AutoIT release the hold and track from FROM x,y to the TO x,y and make AU point to the TO.

Mind you, you'll probably get lag in any of the concepts if it's being tunnels over Teamviewer, will be better with VNC with a really good latency.

​Well, my phone is 960x540 and I'm streaming my PC screen in 1280x720 so it's not really 4K or anything.I haven't thought about your option yet (autoit release hold and follow the X,Y moves).
My idea was that autoit completely disables the option to move mouse when it's clicked (when it's hold) because I think it's very simple to use. Do you have got any ideas for this option?

Btw SplashTop is not laggy as I have experienced so far (Teamviewer is "laggier"), my phone is connected on wifi with max speed 10Mbps and it's just like 600ms ping but that doesn't really matter).

Edited by knucklesCZ

Share this post


Link to post
Share on other sites

​Well, my phone is 960x540 and I'm streaming my PC screen in 1280x720 so it's not really 4K or anything.I haven't thought about your option yet (autoit release hold and follow the X,Y moves).My idea was that autoit completely disables the option to move mouse when it's clicked (when it's hold) because I think it's very simple to use. Do you have got any ideas for this option?

​How do you mean to completely disable the mouse movement on drag? That's more System API level, I don't think Autoit can do such a thing tbh.
Regardless, you must note it's all about latency timing, even a 5GHz spec N+ would have trouble delivering such a smooth experience.

P.s. experiment with Tight VNC. What phone do you have? 10 mbps is rather slow, less then Wireless G spec.

Edited by Scripthen

Share this post


Link to post
Share on other sites

​How do you mean to completely disable the mouse movement on drag? That's more System API level, I don't think Autoit can do such a thing tbh.Regardless, you must note it's all about latency timing, even a 5GHz spec N+ would have trouble delivering such a smooth experience.

P.s. experiment with Tight VNC. What phone do you have? 10 mbps is rather slow, less then Wireless G spec.

​10 Mbps is my home and the other I'm going to use are surely not faster. by 10 Mbps I mean max download speed 1,25MBps. So it's not so easy as I thought because it'd need some dll injecting, right?

Well I maybe found the solution without autoit. I'll try to abuse mouse settings.

See this image: autoit.bmp

Edited by knucklesCZ

Share this post


Link to post
Share on other sites

So wait, are you playing this locally or playing from a remote location? (E.g. playing at home from m9's house)

DLL injecting is using changing (system) resources which are not meant to be changed. I doubt you'll need this.

Share this post


Link to post
Share on other sites

So wait, are you playing this locally or playing from a remote location? (E.g. playing at home from m9's house)

DLL injecting is using changing (system) resources which are not meant to be changed. I doubt you'll need this.

​I'll control the pc from my phone, from a remote location as you say, because even home wifi connects to the internet and then to my PC. I can do something like LAN using a USB cable but that's pretty useless.

Share this post


Link to post
Share on other sites

​I'll control the pc from my phone, from a remote location as you say, because even home wifi connects to the internet and then to my PC. I can do something like LAN using a USB cable but that's pretty useless.

​But if you're signed to the wireless network at home and you're controlling the PC at home also, it's more WLAN (Wireless Local) so you'll get 54 - 300 mbps.

Share this post


Link to post
Share on other sites

​But if you're signed to the wireless network at home and you're controlling the PC at home also, it's more WLAN (Wireless Local) so you'll get 54 - 300 mbps.

Well I made this for the moment.
I don't understand one thing, though. 26 - UP should be y+10 but it's not and 28 - DOWN should be y-10 but it's y+10. It is somehow reversed. LEFT & RIGHT are ok. They work as they are supposed to (left is x-10 and right is x+10).
There isn't an error in the function Hex numbers declared because I found this on an other forum  so 28 is really DOWN

PostMessage(currChild, VK_DOWN, 0, 0);// VK_DOWN = 0x28; --->  so 28 is really DOWN
#include <Misc.au3>
#include <MsgBoxConstants.au3>

$hDLL = DllOpen("user32.dll")

;25 LEFT
;26 UP
;27 RIGHT
;28 DOWN
While 1 ;program on

$aCoord = MouseGetPos()

While _IsPressed(25, $hDLL)
    MouseMove($aCoord[0] - 10, $aCoord[1])
    $aCoord = MouseGetPos()
    Sleep(20)
WEnd
While _IsPressed(26, $hDLL)
    MouseMove($aCoord[0], $aCoord[1] - 10)
    $aCoord = MouseGetPos()
    Sleep(20)
WEnd
While _IsPressed(27, $hDLL)
    MouseMove($aCoord[0] + 10, $aCoord[1])
    $aCoord = MouseGetPos()
    Sleep(20)
WEnd
While _IsPressed(28, $hDLL)
    MouseMove($aCoord[0], $aCoord[1] + 10)
    $aCoord = MouseGetPos()
    Sleep(20)
WEnd


WEnd ;program on

 

 

Edited by knucklesCZ

Share this post


Link to post
Share on other sites

knucklesCZ,

This is game automation - thread locked.

Scripthen,

Have the courage of your convictions - do not let the BIG FONT bully you.

M23

Edit: And knucklesCZ, I see you reported the person telling you about the rules - I suggest you read them carefully before you post again.

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Similar Content

    • By nacerbaaziz
      good morning all.
      first lit me give you all a thinks to your help
      you're help me allot thank you all.
      sirs today i've a new problem
      it's not a problem but thing i want to add it to blind accessability.
      the ListBox can send a notification when the user send a double click on it items
      but as we know that the blind users can't use the mouse for that they use the keybord to navigate.
      as we know that the enter replace the double click on the keybord
      for that i need when the user send a inter above any listBox item the list send a double click notification.
      i know some of you tell me that i can use the  GUISetAccelerators function
      but the enter has a other tasks such as leav a blanc line on edits and activate the defaultButton and other tasks.
      that what i need and i hope that you can help me
      this is a simple example.
      #include <GUIConstantsEx.au3> #include <StructureConstants.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <ListBoxConstants.au3> Example() Func Example() Local $sMESSAGE = "The following buttons have been clicked" GUICreate("My GUI list") ; will create a dialog box that when displayed is centered Local $idButton_Add = GUICtrlCreateButton("Add", 64, 32, 75, 25) Local $idButton_Clear = GUICtrlCreateButton("Clear", 64, 72, 75, 25) global $idMylist = GUICtrlCreateList("buttons that have been clicked", 176, 32, 121, 97) GUICtrlSetLimit(-1, 200) ; to limit horizontal scrolling GUICtrlSetData(-1, $sMESSAGE) global $DummyList = GUICtrlCreateDummy() GUICtrlSendToDummy($DummyList, 1) Local $idButton_Close = GUICtrlCreateButton("my closing button", 64, 160, 175, 25) GUIRegisterMsg($WM_command, "WM_command") GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idButton_Add GUICtrlSetData($idMylist, "You clicked button No1|") Case $idButton_Clear GUICtrlSetData($idMylist, "") Case $idButton_Close MsgBox($MB_SYSTEMMODAL, "", "the closing button has been clicked", 2) Exit case $DummyList $g_iTemp = GUICtrlRead($DummyList) if $g_iTemp = $LBN_DBLCLK then ;$LBN_DBLCLK then msgBox(64, "", "") endIf GUICtrlSendToDummy($DummyList, 0) EndSwitch WEnd EndFunc ;==>Example Func WM_command($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = $lParam $iCode = BitShift($wParam, 16) ; Hi Word Switch $hWndFrom Case GUICtrlGetHandle($idMylist) Switch $iCode Case $LBN_SELCHANGE, $LBN_DBLCLK, $LBN_SELCANCEL, $LBN_SETFOCUS GUICtrlSendToDummy($DummyList, $iCode) case else ;GUICtrlSendToDummy($DummyTreeview, 1) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc  
    • By _leo_
      Hey there!
      I am having a problem with clicking a button in IE. As you can see in the code, there would be a class name to click it, but since this button exists several times with exactly the same code, I can only use the "Noch nicht veröffentlicht" to separate it from the others. But this part is just pure text without any classification. 
      "<div class="checkmark" data-v-1e5b1f70=""><svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 16 16" data-v-1e5b1f70=""><circle cx="8" cy="8" r="8" data-v-1e5b1f70="" /></svg></div>Noch nicht veröffentlicht"
      I was trying to click it with:
      #include <IE.au3> local $oNNVs = _IEFormGetCollection($oIE2) For $oNNV in $oNNVs If String($oNNV.innertext) = "Noch nicht veröffentlicht" Then _IEAction($oNNV, "click") EndIf Next and:
      $inputs = $oIE2.document.getElementsByTagName("div") For $input In $inputs If $input.innertext == "Noch nicht veröffentlicht" then $input.click() EndIf Next But nothing seems to work. Thanks for the help!
    • By CarlD
      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.
    • By XinYoung
      Greetings!
      I am in need of your guidance once again. I searched the forums for clicking in span, clicking by class, clicking without an ID or Name, etc., but I am unable to find a solution for my problem.
      I am trying to expand this tree in IE. There is an arrow ( > ) that i need to click, but I can't find a way to do it . Alternatively, I can double-click the text "Servers", but that seems to be even more troublesome. I will have to do this 2-3 more times as the tree expands.
      There appears to be an ID for the tree, simply called "tree", but that isn't working when I send a click to it.

      ;Open an IE session and navigate to pgAdmin. Global $oIE = _IECreate($pgAdmin) ;Maximize the IE window. WinSetState(_IEPropertyGet($oIE, "hwnd"), "", @SW_MAXIMIZE) Sleep(2000) ;Expand the tree $oTree = _IEGetObjById($oIE, "tree") _IEAction($oTree, "click") Any ideas?  
    • By XinYoung
      Quick question: How can I click this "Select All" button in IE? There's no ID, and the href is "#"  
      Am I looking at the wrong html code?
      Am I looking
      Thank you all in advance!
×
×
  • Create New...