Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

37 Ahk enhancements


  • Please log in to reply
20 replies to this topic
Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

CalledBy_A:
CalledBy_B:
CalledBy_C:
Subroutine:

I'll add it to the to-do list, but for code-size reasons it might not get added. Here is an alternative approach that I know isn't as nice:
CalledBy_A:
SubroutineCaller = A
Goto Subroutine
CalledBy_B:
SubroutineCaller = B
Goto Subroutine
CalledBy_C:
SubroutineCaller = C
Goto Subroutine ; Not necessary, just for maintainability.

Subroutine:
if Subroutinecaller = A
...

Why not create these global variables in the code? Just before jumping to the common section of code assign a variable the value of the section

Nice. That's a more concise way of doing it.

1) customize the Ahk tray menu, keeping the standard items.
2) Reload the script (otherwise the behavior may be masked).
3) right-click the Ahk icon and select Pause Script from the custom menu.
4) If you right-click the Ahk icon again, the tray menu does not appear; however, one can unpause the script if Pause has been assigned to hotkey.

Since I still can't reproduce it, it's possible it was fixed in a recent release. I ran the following on XP. Perhaps you can try it on Windows 2000 and see if it occurs:
#Persistent 
Menu, Tray, Add, Test, Test 
return 

Test: 
MsgBox You selected %A_ThisMenuItem%. 
return

the [sort] delimiter is limited to only one character

I'll make sure this is only the list of improvements to consider for Sort.

Thanks for all the ideas.

Nemroth
  • Members
  • 278 posts
  • Last active: Dec 31 2011 10:53 PM
  • Joined: 07 Sep 2004

Here is an alternative approach that I know isn't as nice:

CalledBy_A:
SubroutineCaller = A
Goto Subroutine
CalledBy_B:
SubroutineCaller = B
Goto Subroutine
CalledBy_C:
SubroutineCaller = C
Goto Subroutine ; Not necessary, just for maintainability.

Subroutine:
if Subroutinecaller = A
...


I use this type of call to a subroutine with different possibilities. It isn't very "pretty" but it works...

jdmarch
  • Members
  • 21 posts
  • Last active: Aug 26 2008 04:53 PM
  • Joined: 26 Feb 2006
> Quote:`s one-space escape sequence. better than typing {space}
> It's a good idea and I'd definitely do it if it weren't for the breaking of
> existing scripts. The built-in variable A_Space, while awkward to use,
> should be used instead.

Chris, my editor is set, for otherwise good reason, to truncate all trailing spaces. And I want *only* space as an Endchar. I don't see any workaround for this.

How about a directive to enable 's?

Thanks - beautiful program!

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
You want only a space as an EndChar for hotstrings? It's true there's no way to do that, so I'll look into supporting `s in the Hotstring command.
Thanks for the idea.

In the meantime, here's a way that seems to work for having only a space. It relies on the fact that escape characters are ignored inside invalid escape sequences:
#Hotstring EndChars ` `

jdmarch
  • Members
  • 21 posts
  • Last active: Aug 26 2008 04:53 PM
  • Joined: 26 Feb 2006

You want only a space as an EndChar for hotstrings?

Yeah, I'm probably missing out on a lot of power, but that's how I've been using the equivalent of hotstrings for years, so I'm strongly conditioned to it! Maybe later I'll branch out and get wild and crazy and include commas! :)

Thanks for the workaround. Does the job.

jaco0646
  • Guests
  • Last active:
  • Joined: --
I'd just like to add my vote for supporting Gui URLs being a high priority. I think many people would find it useful (me included).