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

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

    • 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.
    • nacerbaaziz
      By nacerbaaziz
      Hi dears
      I've got a question in creating tabs in autoit
      Usually in other programs you can move between tabs by pressing ctrl + tab or ctrl + shift + tab
      I tried to create a window  which have a multy  tab but when i press one of the shortcuts
      it does not move between the tabs
      Is there an option to enable or disable this
      Greetings
      this is the example i tryed

      #include <GUIConstants.au3> #include <MsgBoxConstants.au3> #include <TabConstants.au3> #include <ComboConstants.au3> #include <WindowsConstants.au3> #include <GuiComboBox.au3> effectsSettings() func effectsSettings() local $echoCombo[6], $reverbCombo[5],  $CHORUSCombo[8], $flangerCombo[8], $paramEQCombo[4], $distortionCombo[6], $gargleCombo[3] $EffWindow = GUICreate("efects settings", 400, 400, -1, -1, $WS_TABSTOP) local $BtOK = GUICtrlCreateButton("ok", 5, 360, 50, 30, 0x01) GUIStartGroup("") local $BTCancel = GUICtrlCreateButton("cancel", 340, 360, 50, 30) GUIStartGroup("") local $effectTabs =     GUICtrlCreateTab(10, 10, 380, 70) GUICtrlSetState(-1, $GUI_focus)     GUICtrlCreateTabItem("echo") GUICtrlCreateLabel("fWetDryMix", 50, 100, 100, 60) $echoCombo[1] = GUICtrlCreateCombo("", 60, 110, 80, 40) GUICtrlCreateLabel("fFeedback", 180, 100, 100, 60) $echoCombo[2] = GUICtrlCreateCombo("", 190, 110, 80, 40) GUICtrlCreateLabel("fLeftDelay", 290, 100, 100, 60) $echoCombo[3] = GUICtrlCreateCombo("", 300, 110, 80, 40) GUICtrlCreateLabel("fRightDelay", 50, 180, 100, 60) $echoCombo[4] = GUICtrlCreateCombo("", 60, 190, 80, 40) GUICtrlCreateLabel("lPanDelay", 180, 180, 100, 60) $echoCombo[5] = GUICtrlCreateCombo("", 190, 190, 80, 40)     GUICtrlCreateTabItem("reverb") GUICtrlCreateLabel("fInGain", 50, 100, 100, 60) $ReverbCombo[1] = GUICtrlCreateCombo("", 60, 110, 80, 40) GUICtrlCreateLabel("fReverbMix", 180, 100, 100, 60) $ReverbCombo[2] = GUICtrlCreateCombo("", 190, 110, 80, 40) GUICtrlCreateLabel("fReverbTime", 290, 100, 100, 60) $ReverbCombo[3] = GUICtrlCreateCombo("", 300, 110, 80, 40) GUICtrlCreateLabel("fHighFreqRTRatio", 50, 180, 100, 60) $ReverbCombo[4] = GUICtrlCreateCombo("", 60, 190, 80, 40)     GUICtrlCreateTabItem("chorus") GUICtrlCreateLabel("fWetDryMix", 50, 100, 100, 60) $ChorusCombo[1] = GUICtrlCreateCombo("", 60, 110, 80, 40) GUICtrlCreateLabel("fDepth", 180, 100, 100, 60) $ChorusCombo[2] = GUICtrlCreateCombo("", 190, 110, 80, 40) GUICtrlCreateLabel("fFeedback", 290, 100, 100, 60) $ChorusCombo[3] = GUICtrlCreateCombo("", 300, 110, 80, 40) GUICtrlCreateLabel("fFrequency", 50, 180, 100, 60) $ChorusCombo[4] = GUICtrlCreateCombo("", 60, 190, 80, 40) GUICtrlCreateLabel("lWaveform", 180, 180, 100, 60) $ChorusCombo[5] = GUICtrlCreateCombo("", 190, 190, 80, 40) GUICtrlCreateLabel("fDelay", 290, 180, 100, 60) $ChorusCombo[6] = GUICtrlCreateCombo("", 300, 190, 80, 40) GUICtrlCreateLabel("lPhase", 50, 260, 100, 60) $ChorusCombo[7] = GUICtrlCreateCombo("", 60, 270, 80, 40)     GUICtrlCreateTabItem("flanger") GUICtrlCreateLabel("fWetDryMix", 50, 100, 100, 60) $FlangerCombo[1] = GUICtrlCreateCombo("", 60, 110, 80, 40) GUICtrlCreateLabel("fDepth", 180, 100, 100, 60) $FlangerCombo[2] = GUICtrlCreateCombo("", 190, 110, 80, 40) GUICtrlCreateLabel("fFeedback", 290, 100, 100, 60) $FlangerCombo[3] = GUICtrlCreateCombo("", 300, 110, 80, 40) GUICtrlCreateLabel("fFrequency", 50, 180, 100, 60) $FlangerCombo[4] = GUICtrlCreateCombo("", 60, 190, 80, 40) GUICtrlCreateLabel("lWaveform", 180, 180, 100, 60) $FlangerCombo[5] = GUICtrlCreateCombo("", 190, 190, 80, 40) GUICtrlCreateLabel("fDelay", 290, 180, 100, 60) $FlangerCombo[6] = GUICtrlCreateCombo("", 300, 190, 80, 40) GUICtrlCreateLabel("lPhase", 50, 260, 100, 60) $FlangerCombo[7] = GUICtrlCreateCombo("", 60, 270, 80, 40)     GUICtrlCreateTabItem("paramatric eq") GUICtrlCreateLabel("fCenter", 50, 100, 100, 60) $parameqCombo[1] = GUICtrlCreateCombo("", 60, 110, 80, 40) GUICtrlCreateLabel("fBandwidth", 180, 100, 100, 60) $ParamEqCombo[2] = GUICtrlCreateCombo("", 190, 110, 80, 40) GUICtrlCreateLabel("fGain", 290, 100, 100, 60) $parameqCombo[3] = GUICtrlCreateCombo("", 300, 110, 80, 40)     GUICtrlCreateTabItem("distortion") GUICtrlCreateLabel("fGain", 50, 100, 100, 60) $distortionCombo[1] = GUICtrlCreateCombo("", 60, 110, 80, 40) GUICtrlCreateLabel("fEdge", 180, 100, 100, 60) $distortionCombo[2] = GUICtrlCreateCombo("", 190, 110, 80, 40) GUICtrlCreateLabel("fPostEQCenterFrequency", 290, 100, 100, 60) $distortionCombo[3] = GUICtrlCreateCombo("", 300, 110, 80, 40) GUICtrlCreateLabel("fFrequency", 50, 180, 100, 60) $distortionCombo[4] = GUICtrlCreateCombo("", 60, 190, 80, 40) GUICtrlCreateLabel("fPostEQBandwidth", 180, 180, 100, 60) $distortionCombo[5] = GUICtrlCreateCombo("", 190, 190, 80, 40)     GUICtrlCreateTabItem("gargle") GUICtrlCreateLabel("dwRateHz", 50, 100, 100, 60) $gargleCombo[1] = GUICtrlCreateCombo("", 60, 110, 80, 40) GUICtrlCreateLabel("dwWaveShape", 180, 100, 100, 60) $gargleCombo[2] = GUICtrlCreateCombo("", 190, 110, 80, 40) GUISetState(@sw_show, $EffWindow) While 1 Switch GUIGetMSG() case $GUI_Event_close, $BTCancel exit EndSwitch Wend return "" endFunc
    • Pike
      By Pike
      Hello Everyone,
      New Guy here. This is a two-part question, hopefully easy enough though. I know it's ugly coding, this is because I have only a couple hours worth of coding experience and could really use some help.
      1) When I single click the button I want one action (like playing a sound clip) and when I double click the button I want a different action (such as opening dialogue box to ask for soundclip directory address). At the bottom of the script I made a comment which one I would like single click versus double click.
      2) I can not get the FileOpenDialogue to save the file address to the config.ini file at the 'One' position on the .ini.
      #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <FileConstants.au3> #include <AutoItConstants.au3> #include <Sound.au3> Opt('MustDeclareVars', 1) Opt("GUIOnEventMode", 1) Global $OneID _Main() Func _Main() GUICreate("Form1", 156, 86, 281, 276) $OneID = GUICtrlCreateButton("Button", 15, 17, 122, 37) GUICtrlSetOnEvent($OneID, "OnOne") GUISetOnEvent($GUI_EVENT_CLOSE, "OnExit") GUISetState() While 1 While 1 Sleep(1000) WEnd WEnd EndFunc ;---------------Functions------------- While 1 Sleep(100) WEnd Func OnOne() ; ******************Single Click for this action**************** $OneID = IniRead("config.ini", "Config", "One", $OneID) If $OneID = True Then SoundPlay($OneID, @HotKeyPressed) Else ; *******Double Click for this action*****And Help Saving File Address to config.ini 'One'*********** $OneID = FileOpenDialog("Select file", @WorkingDir, "All (*.*)") IniWrite("config.ini", "Config", "One", $OneID) $OneID = InputBox("Enter Information", "Short Name for File?", "") IniWrite("config.ini", "Config", "NameOne", $OneID) EndIf EndFunc Any help would be greatly appreciated, and if you need anymore clarity as to what exactly I'm trying to do, please do not hesitate to ask. Thanks so much!
      Pike
    • Gowrisankar
      By Gowrisankar
      Dear members,
      I'm trying to move unread mails from Inbox to a different folder using OutlookEx UDF.
      But its not working for me. I'm not sure what mistake I do.
      I get the error code 6 when the following is executed. From the UDF it is observed that  "No or an invalid item has been specified".
      Note : The UDF version is 1.3.3.1. AutoIt version (v3.3.14.2).
      #include <OutlookEX.au3> Global $oOutlook = _OL_Open() If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended) Global $aOL_Item = _OL_ItemFind($oOutlook, "*\Inbox", $olMail, "[UnRead]=True", "", "", "Subject", "", 1) If $aOL_Item[0][0] = 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemMove Example Script", "Could not find a task item in folder 'Outlook-UDF-Test\SourceFolder\Tasks'. @error = " & @error) _ArrayDisplay($aOL_Item, "OutlookEX UDF: _OL_ItemFind Example Script - Unread mails") _OL_ItemMove($oOutlook, $aOL_Item[1][0], Default, "*\Outlook-UDF-Test\TargetFolder\Mail") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemMove Example Script", "Error moving specified task. @error = " & @error) Any help is deeply appreciated. Thanks in advance.
      Thanks and regards,
      Gowrisankar R.
    • dadalt
      By dadalt
      Hi!
      I have a button where I need to close it!
      I was doing through  clicking same position in screen but there are some id's that have different sizes.
      What are the possible ways to click this closable button?
      Is there a way to close it through id? Is there a way to get it's position through it's ID?  
      Thanks in advance!


×