Jump to content


Photo

strange hotstring behavior


  • Please log in to reply
10 replies to this topic

#1 hpk1908

hpk1908
  • Members
  • 6 posts

Posted 17 August 2012 - 09:43 PM

I have several hotstrings of the form:
:*:xxx::some text
these hotstrings have always worked perfectly. They erase the triggering string and replace it with the text without an ending character. Now, however, they all are doing the same strange thing. They type type all but the last characters of the triggering string and then erase the final characters of the replacement text, like this:
:*:xxx::this text
now produces this result:
xxthis te
or this:
:*:mygm::mymail@gmail.com
now gives:
mygmymail@gmail.
What in the world is going on! - help

#2 Leef_me

Leef_me
  • Moderators
  • 7704 posts

Posted 17 August 2012 - 11:32 PM

Hi hpk1908, welcome to the forum.

First question: what changed ? New computer ? New version of AHk?

question two: are you trying to use something on a remote computer ?

third question: have you tried closing all running ahk scripts and opening just this one ?

question four: have you tried rebooting your computer?

#3 hpk1908

hpk1908
  • Members
  • 6 posts

Posted 18 August 2012 - 05:13 PM

Thanks for your reply.
First of all, I'm running the same version of autohotkey that I've always had and the same computer. I am only running one script and I have tried rebooting. The one thing that has been different since the hotstrings have been malfunctioning is that my computer was controlled remotely by a technician who was setting up our local network. We added a new computer and the AHK script doesn't return correct hotstrings on that computer either. I hope this helps. I really don't understand it.

#4 Leef_me

Leef_me
  • Moderators
  • 7704 posts

Posted 18 August 2012 - 07:33 PM

We added a new computer

I'm not sure how that might affect your computer's operation.

The way AHk works for me is to use hotkeys and hotstrings on my local computer,
with the script running on my local computer.

Are you using Ahk in this same manner?
or are you trying to use it with a remote computer ?

At times I need to "log in" to a remote computer to edit files.
I have found that there is somewhat of a delay before keys, click and mousemoves are recognized.
I haven't tried, but don't think AHk would do well in this type of setup.


I've heard of systems where the local computer is primarily an interface,
All programs and data are "servered" from a main system that stores the applications and/or the data.
Is it possible that your system is something like this ?



Can you mak a copy of your original script and modify the hotstrings by removing the *
(so that an ending charcter is required) ?
Make sure only the modified version of the script is running and see what results you get.

#5 hpk1908

hpk1908
  • Members
  • 6 posts

Posted 18 August 2012 - 08:47 PM

I'm sorry if I didn't make it clear, but I am not running any computer remotely. There are two computers on our network, but I only use one at a time and most often the other computer is not even turned on. The only remote activity has been when the technician remotely controlled both machines when he was setting up the network. I have turned off the * option, but the only difference it made was that all the triggering string printed and it cut off the trailing characters of the replacement string. Something like this:
::*xy::printthis
result after typing the hot and an ending character:
*xyprintt
From the above, it looks like the B option is turned off ,but I also explicitly turned it on and it gave the same results.

#6 Guests

  • Guests

Posted 18 August 2012 - 09:05 PM

Are you sure you have no other scripts running?
Other hotkey programs?
What if you write a new script (close all others) with just this:
::btw::by the way


#7 hpk1908

hpk1908
  • Members
  • 6 posts

Posted 18 August 2012 - 10:59 PM

I removed all scripts and just ran one script as you suggested. The script was:
::btw::by the way
here is what I get when I type the triggering string and follow it with a line feed: btwby the w

I just don't get it. they have always worked great before.

#8 Leef_me

Leef_me
  • Moderators
  • 7704 posts

Posted 18 August 2012 - 11:16 PM

Two additional questions:
What version of AHk are you using?
Do you compile the script of just run the *.ahk version?

clipboard = version is %A_AhkVersion%
msgbox version is %A_AhkVersion%

Based in the effort and tests done, it seems like it is time to go back to the technician and ask "what did you do?"

#9 hpk1908

hpk1908
  • Members
  • 6 posts

Posted 19 August 2012 - 01:32 AM

Yes, I think you're right; that's what I'll do.

#10 Guests

  • Guests

Posted 19 August 2012 - 05:59 AM

Try various send modes

Makes Send synonymous with SendInput or SendPlay rather than the default (SendEvent). Also makes Click and MouseMove/Click/Drag use the specified method.
Source: http://www.autohotke...ds/SendMode.htm

and

Sets the delay that will occur after each keystroke sent by Send or ControlSend.
Source: http://www.autohotke...SetKeyDelay.htm


If all else fails, you could try to use Clip() to simply paste texts instead of sending them (you will retain your current clipboard) <!-- m -->http://www.autohotke....html#clipboard<!-- m -->

#11 hpk1908

hpk1908
  • Members
  • 6 posts

Posted 20 August 2012 - 02:15 PM

Thanks all, got it fixed now.