Jump to content
knucklesCZ

mouse click&drag disable

Recommended Posts

knucklesCZ

 

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
Scripthen

This is game automation. Game automation isn't allow.

Share this post


Link to post
Share on other sites
knucklesCZ

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
Scripthen

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
knucklesCZ

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
Scripthen

You know AutoIT is AUTOMATION, right?

Share this post


Link to post
Share on other sites
knucklesCZ

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
Scripthen

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
knucklesCZ

Please stay at the topic, don't make up your own rules (by editing the current ones).

Edited by knucklesCZ

Share this post


Link to post
Share on other sites
Scripthen

I'm not making rules. I simply stated the rules, as everyone else does. Gonna give them sh*t? Nope. Thought not.

Share this post


Link to post
Share on other sites
knucklesCZ

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
Scripthen

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
knucklesCZ

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
Scripthen

​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
knucklesCZ

​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
Scripthen

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
knucklesCZ

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
Scripthen

​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
knucklesCZ

​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
Melba23

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

    • WoodGrain
      By WoodGrain
      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!
    • badcoder123
      By badcoder123
      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
    • nooneclose
      By nooneclose
      Hello again, I am in phase two of my help bot. I cannot figure out how to properly code Autoit to click on a webpage button using the I.E UDF. I want to click on the button that I have attached as an image. This button does not have a name but it has an ID. Here is the HTML code for this button that I found using chromes developer inspector.
      HTML Code: 
      <img role="button" tabindex="-1" id="toolactions_INSERT-tbb_image" src="nav_icon_insertkey.gif" alt="New Work Order CTRL+ALT+I" draggable="false"> Here is the code that I have so far:
      ;******************************************************************************* ; Opens IE and fill out a New Workorder ;******************************************************************************* ; Start IE at the ** Tracking Application in ****** $oIE = _IECreate("https:I_am_Bound_by_my_company_to_not_reveal_this_webpage") ; Wait for a browser page load to complete _IELoadWait($oIE) Sleep(6000) ; Store the field names where the important data will be sent Local $nWorkOrderB = _IEGetObjById($oIE, "toolactions_INSERT-tbb_image") _IEAction($nWorkOrderB, "click")  I want my program to click on the button that looks like a piece of paper with a blue # 
      (For those wondering, I am allowed to send images just not the URL.) 
      As always any help would be appreciated. 

    • Gowrisankar
      By Gowrisankar
      Dear members, 
      I am working on a project where, emails from outlook are to be read and moved to various folders within the mailbox, based on the content of the emails.
      I used the below code for moving mails. It works fine when I run it against individual mail ids. But when I run it on Shared mailbox, the mails are not moved to respective folders.
      _OL_ItemMove($oOutlook, $sEntryId, Default, $sDestinationFolder) The value of $sEntryId is saved in an excel report initially. The current process reads the $sEntryId from the excel and passes it to "_OL_ItemMove" statement.
      Requesting the guidance of the forum members in this issue.
×