Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider becoming a contibuting member by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

I use PSPad as my editor for AHK. While debugging a script, the process goes like this:

  1. Make a change in the script
  2. Save the new script
  3. Switch to the folder that contains the script
  4. Double-click the script to run it
  5. Repeat

Today, I wrote this script to run a script for me:

 
#SingleInstance Force

F5::
WinGetActiveTitle, Title
StringReplace, Title, Title, [, |
StringReplace, Title, Title, ], |
StringSplit, Title, Title, |
Title1 = %Title1%
If Title1 =PSPad -
{
IfInString, Title2, *
{
Send ^S
StringTrimRight, Title2, Title2, 1
}
Run, %Title2%
}
Return

The title in Pspad for any given script is: PSPad - [Path\script.ahk]

If changes have been made, but not saved the title is: PSPad - [Path\script.ahk*]

If a * is detected in the window, it saves the file first, and then runs it.

I hope someone finds this useful!

Posted

Here's a script to toggle "Always On Top" for a window. To use it, Right-click on the SysMenu (The Icon to the left of the window title). This is a script I modified from an original script by shimanov. http://www.autohotkey.com/forum/viewtopic.php?t=8486

RButton::
CoordMode, Mouse, Screen
MouseGetPos, m_x, m_y, Title
SendMessage, 0x84,, ( m_y << 16 )|m_x,, ahk_id %Title%
If ( ErrorLevel = 3 )
{
WinActivate, ahk_id %Title%
WinSet, AlwaysOnTop, Toggle, ahk_id %Title%
}
Else
Send, {RButton}
return

  • 1 month later...
Posted

I like this one. Highlight text anywhere, and Press {Ctrl}G. The Highlighted test will be 'Googled' automatically. If you do not have your browser open, it will open. If it is already open, the active tab will be used. Tested on IE7.

I take no credit at all for this one. I took an original idea from NakariaSan, and added Sean's COM Library to add compatibility with tabs in IE7.

Google_It_.7z

Posted

These are very interesting scripts. Thanks Tempest. Although I cannot say I would use them I do like looking at the script for ideas.

Thanks for sharing.

Brian hoffman

Guest
This topic is now closed to further replies.
×
×
  • Create New...