Jump to content


Simple script issue please help


  • Please log in to reply
5 replies to this topic

#1 Dale200

Dale200
  • Guests

Posted 20 April 2012 - 10:08 PM

Hi!

I'm having this little issue with two scripts using ~ modifier for a hot key.

Script one:
~T::
msgbox you pressed T!
return

Script two:
Send {T}
return

So I launch script one and then launch script two. But the message box never appears saying 'you pressed T!' when I use the ~ modifier.

I don't want it to block the key's native function but I do want it to still show the message box. Is there something I have missed in the documentation that will allow me to do this?

Thanking you for any help!

Dale

#2 dmg

dmg
  • Members
  • 1794 posts

Posted 20 April 2012 - 10:23 PM

This is only a guess, and untested, but does this work?:
~[color=#FF0000]$[/color]T::

msgbox you pressed T!

return


#3 Dale200

Dale200
  • Guests

Posted 20 April 2012 - 10:39 PM

I tried that but didn't to work unfortunately.

#4 Ohnitiel

Ohnitiel
  • Members
  • 664 posts

Posted 20 April 2012 - 10:55 PM

I didn't really get your question, but this:

~t::
msgbox you pressed T!
Return

Works fine for me. It sends t and then shows the msgbox.

#5 Dale200

Dale200
  • Guests

Posted 21 April 2012 - 12:39 AM

I didn't really get your question, but this:

~t::
msgbox you pressed T!
Return

Works fine for me. It sends t and then shows the msgbox.


Did you set off the hotkey routine by manually pressing T or by launching script 2?

Ill try to explain better:

I'm trying to get script 2 to send the letter T, not block the native function (so T is still pressed) and to also start the subroutine in script one.

#6 Dale200

Dale200
  • Guests

Posted 22 April 2012 - 04:43 AM

I also tried with a single script and had the same failure;

sendinput {K}


~K::
msgbox K pressed
return


As with the first example, the routine is never executed with the ~ modifier in front of the key. I also tried with send rather than sendinput. But still no luck?