AutoHotkey Community

It is currently May 27th, 2012, 8:21 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 171 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11, 12  Next
Author Message
 Post subject:
PostPosted: January 28th, 2012, 2:02 pm 
You could try via Reload
Code:
~Lbutton:: ; I don't recommend adding up/left/down/right
~Rbutton::
Reload
ExitApp
Return
try experimenting with the position in/outside #if... , above/below hostrings() etc. I had it crash my PC by adding up/down and
just scrolling in notepad as it couldn't keep up with the reload commands which I why I don't recommend adding these as "reload" hotkeys


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 29th, 2012, 1:00 am 
Offline

Joined: June 7th, 2007, 1:33 pm
Posts: 1019
Anonymous wrote:
You could try via Reload
Code:
~Lbutton:: ; I don't recommend adding up/left/down/right
~Rbutton::
Reload
ExitApp
Return
try experimenting with the position in/outside #if... , above/below hostrings() etc. I had it crash my PC by adding up/down and
just scrolling in notepad as it couldn't keep up with the reload commands which I why I don't recommend adding these as "reload" hotkeys


thanks but this wouldnt be a sufficient solution, because I mainly navigate across text boxes via mouse clicks, tab key and arrow keys

can anyone confirm the "bug" I mentioned in my previous post? and maybe it can be fixed somehow?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2012, 2:06 am 
Offline

Joined: July 20th, 2009, 6:01 am
Posts: 166
Location: Amsterdam
Perhaps this is what caused your hotstring not to work in different windows, if you click the mouse:

Code:
Any click of the left or right mouse button will reset the hotstring recognizer. In other words, the script will begin waiting for an entirely new hotstring, eliminating from consideration anything you previously typed (if this is undesirable, specify the line #Hotstring NoMouse anywhere in the script). This "reset upon mouse click" behavior is the default because each click typically moves the text insertion point (caret) or sets keyboard focus to a new control/field. In such cases, it is usually desirable to: 1) fire a hotstring even if it lacks the question mark option; 2) prevent a firing when something you type after clicking the mouse accidentally forms a valid abbreviation with what you typed before.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2012, 12:31 pm 
Offline

Joined: June 7th, 2007, 1:33 pm
Posts: 1019
Cerberus wrote:
Perhaps this is what caused your hotstring not to work in different windows, if you click the mouse:

Code:
Any click of the left or right mouse button will reset the hotstring recognizer. In other words, the script will begin waiting for an entirely new hotstring, eliminating from consideration anything you previously typed (if this is undesirable, specify the line #Hotstring NoMouse anywhere in the script). This "reset upon mouse click" behavior is the default because each click typically moves the text insertion point (caret) or sets keyboard focus to a new control/field. In such cases, it is usually desirable to: 1) fire a hotstring even if it lacks the question mark option; 2) prevent a firing when something you type after clicking the mouse accidentally forms a valid abbreviation with what you typed before.


exactly

but tab key and arrow keys may also "typically move the text insertion point (caret) or sets keyboard focus to a new control/field"

what can be done for this? any idea?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2012, 12:44 pm 
The standard documentation of hotstrings/hotkeys do not apply as this is specialized function, the Reload example is the ONLY SOLUTION. If that is not satisfactory you are out of luck, just deal with it. And please azure, stop bumping a post if you don't get a response.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2012, 1:35 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
Update v2.57 now follows AutoHotkey hotstring behaviour by clearing the key sequence when directional keys and mouse buttons are pressed.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2012, 10:08 pm 
Offline

Joined: June 7th, 2007, 1:33 pm
Posts: 1019
polyethene wrote:
Update v2.57 now follows AutoHotkey hotstring behaviour by clearing the key sequence when directional keys and mouse buttons are pressed.


great! thanks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2012, 7:40 pm 
Help me please.
hotstrings("([a-z]{3})\s", "<alpha>%$1%</alpha>") works fine
hotstrings("([0-9]{3})\s", "<digit>%$1%</digit>") never fires
What is wrong?
I greatly appreciate any help!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2012, 7:58 pm 
Code:
hotstrings("(\d{3})\s", "<digit>%$1%</digit>")
:?:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2012, 8:01 pm 
hotstrings("(\d{3})\s", "<digit>%$1%</digit>") never fires :(


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2012, 8:20 pm 
Both do for me, are you absolutely sure there are no other scripts running with hotstrings? Also add #SingleInstance, Force to the top of your hotstrings script, I find that it helps when reloading...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2012, 9:44 pm 
No success :(

I did this:

- I uninstalled AutoHotKey
- I deleted all files with extension AHK in PC
- I installed AutoHotKey again (ver. 1.1.07.01)
- I run AutoHotKey and I let create file AutoHotkey.ahk
- I rewrited content of file AutoHotkey.ahk with Hotstrings.ahk (v 2.57) and I added my 3 lines to the beginning of the file
- I run AutoHotKey

hotstrings("([a-z]{3})\s", "<alpha>%$1%</alpha>") works
hotstrings("(\d{3})\s", "<digit>%$1%</digit>") doesnt work
hotstrings("([0-9]{3})\s", "<digit>%$1%</digit>") doesnt work

I have repeated this procedure three times:
I installed "Unicode (32-bit)", "Unicode (64-bit)", ANSI (32-bit)
Always the same result.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2012, 10:57 pm 
Do you run as http://www.autohotkey.com/wiki/index.ph ... inistrator

?

Again it works for me, sorry if it doesn't for you. Do you have any other hotkey software or clipboard manager thingy running? (there is no need to uninstall ahk just to try a different script). Did you add the #SingleInstance, Force to the top?

Tip: Use [code][/code] tags when posting code, it makes it easier to read. You can find it on the row of buttons when you write your post:

Image


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2012, 10:58 pm 
What if you just run a script with
Code:
hotstrings("(\d{3})\s", "<digit>%$1%</digit>")
in it, so don't include the alpha.

Did/do you save your scripts as unicode
Image
(just to be sure)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2012, 11:25 pm 
No other hotkey software or clipboard manager.
I added the #SingleInstance to the top.
File is saved in UTF-8.
PC is running Windows 7 Professional SP1 64-bit.

I go to sleep and I will continue tomorrow.
Thank you very much!


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 171 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11, 12  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: AndyJenk, Bing [Bot], Stigg, Yahoo [Bot] and 11 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group