AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AutoReplace of existing text

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
ictium



Joined: 12 Nov 2009
Posts: 8

PostPosted: Thu Nov 12, 2009 8:53 pm    Post subject: AutoReplace of existing text Reply with quote

Hi,
I am new to AHK, but already looking for an improvement. Smile
As far as I know, it allows to expand a short term that is entered by the user.
I would like to know if it could be used to expand a short term that already exists in the text ? For example, let's say I have a document open that already contains the word "PC" and that "PC" expanded form is alrealy
defined as "Personal Computer". Would there be a way to
expand "PC" into "Personal Computer" in this situation? I think the solution would be for the user to place the cursor at the right of the short term and let AHK select it and replace it with its expanded form.


Regards.

Chris

[Moved from Wish List forum. ~jaco0646]
Back to top
View user's profile Send private message
wrong section alert
Guest





PostPosted: Thu Nov 12, 2009 8:56 pm    Post subject: Reply with quote

very possible. check the manual and search the forum.

mod, please move to Ask Fro Help forum.
Back to top
jaco0646



Joined: 07 Oct 2006
Posts: 3113
Location: MN, USA

PostPosted: Fri Nov 13, 2009 12:52 am    Post subject: Reply with quote

Triggering hotstrings via text selected in a window?
Scan and correct text
Back to top
View user's profile Send private message Visit poster's website
ictium



Joined: 12 Nov 2009
Posts: 8

PostPosted: Fri Nov 13, 2009 4:29 pm    Post subject: Selecting the word at the left of cursor Reply with quote

Hi jaco0646,
Thank you for the references.
"Triggering hotstrings via text selected in a window" is very helpful.
However "scan and correct text" is too complex in my case. What I need instead is a script that selects the word -whatever its length- that is immediately at the left of the cursor (the same way as "Ctrl+Shift+Left" acts in Word).
Is it possible to have AHK do this operation ?
Thank you for you help.
Back to top
View user's profile Send private message
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Fri Nov 13, 2009 4:39 pm    Post subject: Reply with quote

Yes,
Code:
Send, ^+{Left}^c
should copy the word LEFT of the caret, ^x will cut it.
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
ictium



Joined: 12 Nov 2009
Posts: 8

PostPosted: Fri Nov 13, 2009 6:50 pm    Post subject: Problem solved Reply with quote

Hi HugoV & jaco0646,
My problem is solved. Thank you for your great help and responsiveness.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group