Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

ControlSend function problems


  • Please log in to reply
2 replies to this topic
ariel9016
  • Members
  • 2 posts
  • Last active: Oct 23 2015 10:54 PM
  • Joined: 22 Oct 2015

Ok so hi everyone, this is a script ment for game call "MapleStory", I made full script on Autoit but as you know its force me to not touch the computer and do not minimize the window, so I went to ControlSend functions and couldnt send Right/Left arrow as Down/up functions, which means, my character didnt move.

So I decided to give a shot on this script program, AutoHotKey.

So I will copy the whole script here, just my problem: 

 

 

 
wintitle = MapleStory
SetTitleMatchMode, 2
#SingleInstance Force
 
 
 
 
fnHoldDown(key,duration)
{  
Global wintitle
End := (A_Tickcount + duration)
While (A_Tickcount < end)
   { 
ControlSend, ,{%key% down}, %wintitle%
Sleep 10
   }
}
 
 
 
 
 
 
IfWinExist %wintitle% 
{
sleep 1000
fnHoldDown("up","5000")
   ControlSend, , {up Up}, %WinTitle%
}
Return
 
 
 
 
 
 
 
 
 
So this is the script, its Holding Up Arrow for 5 seconds, and this is work, but when I change from "up" [up arrow] to "right"/"Right"/"RIGHT" [right arrow in many options], it doesnt do anything, of course its include Left arrow.
So, what can I do? there is other option of writting to the window/ to the control, to hold right/left arrow so my character will finally move? xD.
 
Thanks alot for everyone who will answer / or not answer.


ariel9016
  • Members
  • 2 posts
  • Last active: Oct 23 2015 10:54 PM
  • Joined: 22 Oct 2015

buumppppp



ceglowm
  • Members
  • 1 posts
  • Last active: Dec 14 2015 10:54 PM
  • Joined: 14 Dec 2015

Put this at the top of your script:
 

SendMode Input
#UseHook
#InstallKeybdHook
 
Also, you'll have to compile the script (right-click the ahk file and press complile script) then run it as administrator.