| View previous topic :: View next topic |
| Author |
Message |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Thu Jan 27, 2005 3:01 pm Post subject: |
|
|
| I thought about using the built-in Sort command to remove duplicates, but it's not really appropriate for this particular task. This is because you would want each duplicate to be reported to the user as it is encountered. The sort command can remove all duplicates, but it would not tell you exactly what items it removed. |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Fri Jan 28, 2005 12:05 am Post subject: |
|
|
Andreas Borutta wrote:
HotString is the script which contains your hotkeys.
At the first line it keeps an index of all used/set hotkeys which are listed below of it. If you press ALT+F9 it will call HotStringCreator.ahk
HotStringCreator will ask you to input your new hotkey. Format: <abbreviation> = <expanded abbreviation>
e.g. btw = baden tut weh
1) it will take that string and splits it.
2) will read the first line/index of HotString.ahk and check if the abbrev taken from the inputvar already exists within that index.
3) if yes - rejection
4) if no - it adds ...
- the new abbrev to update the index line
- it adds the new hotkey
- it writes both to HotString.tmp
5) all other existing hotkey will be "copied" to HotString.tmp as well
Done. No double entries.
BTW: I havn't known Chris' sample code . Formerly I had an intro before my previous code section. Something like: "I'm faster writing the below code snippet as to read that whole thread" . |
|
| Back to top |
|
 |
Andreas Borutta
Joined: 23 Jan 2005 Posts: 47
|
Posted: Fri Jan 28, 2005 1:29 am Post subject: |
|
|
@BoBo
Thanks for your explanation.
For me the feature of using "a selected text with several lines" is essential.
The complete (updated since the first posting) sketch for the script you find on
http://borumat.de/autohotkey-issues.php#hotstring4me
Please tell me, if something in the sketch isn't clear.
May be you or someone else likes the idea and likes to code the script - based on the existing scripts in this thread.
Maybe one thing isn't possible at the moment, if I understand Chris correctly:
*extracting the processname automatically
I suggested the processname as condition because in some cases the window-titles are configured by the user.
For example: in Firefox and Thunderbird I disabled the postfix in the titlebar because the readability of the title increases. _________________ Andreas
http://borumat.de/autohotkey-autotexte-und-makros-tipps (german)
http://borumat.de/thunderbird-email-tipps (german)
http://borumat.de/firefox-browser-tipps (german) |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Fri Jan 28, 2005 11:10 am Post subject: |
|
|
@ Andreas Borutta
first of all I would appreciate if Chris could move this thread to the Support Area as it has left the status of a "command wished to be implemented in AHK" but has become a workaround. Please confirm.
Thx for listening.
| Quote: | | Please tell me, if something in the sketch isn't clear |
Ich interpretiere folgendes: du möchtest eine Textzeile selektieren und dieser anschließend einen Hotstring zuweisen ? |
|
| Back to top |
|
 |
Andreas Borutta
Joined: 23 Jan 2005 Posts: 47
|
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Fri Jan 28, 2005 4:42 pm Post subject: |
|
|
| BoBo wrote: | | move this thread to the Support Area as it has left the status of a "command wished to be implemented in AHK" but has become a workaround. Please confirm. | I think it's enough of a wish list item to stay here. I know a lot of topics cover a lot of territory and thus have no clear category, but generally I don't move them if they started off in the right category. |
|
| Back to top |
|
 |
|