AutoHotkey Community

It is currently May 27th, 2012, 11:26 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 46 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Slave-- hotkey macro
PostPosted: July 29th, 2005, 5:58 pm 
Offline

Joined: July 29th, 2005, 5:32 pm
Posts: 179
I've been using autoit/autohotkey to create little time saving scripts for myself for a long time now. This is really my first attempt at making a gui to interface w/ them-- thought i would share..
-----------------------------------------------------------------------------------
Working in a helpdesk type environment-- I found that too much of what I was doing was repetive. The data entry screen we use has its own built in macro editor-- but is limited in functions. I wrote this univeral macro editor to help automate everything repetetive I found myself doing.

-HOTKEYS:-
WIN+<1-9 & 0 (above letters & on side numeric keyboard)> -- These are set as 'hotkeys' that perform whatever action you assign it from built in editor.
Image
-Actions-- Send keystrokes, minimize/maximize/resize windows, run programs/urls/anything you can create shortcut to, mouse clicking/moving..
Image

.. setting a window function through built in editor..
Image

.. now when you hit 'win+1' that window will be activated..
Image

WIN+NUMERIC - (<--MINUS BUTTON ON NUMERIC PAD) -- Whenever hotkey is pressed-- it will take screenshot & save it as a JPG. (i used it to take these screenshots..)

-AUTOEXPAND:-
this allows you to set up keyboard triggers that magically expand when typed.
Image

-AUTOCOMPLETE-
This allows you to create a custom dictionary of commonly used words or phrases. Whenever prog. dectects that you are trying to type one of those words-- it will show autocomplete (hit 'shift+enter' to accept..)
Image

-- Download Slave 3.03.exe --
just put script in its own folder & run (screenshots are saved in that folder by default..)
--------------------------------------------------------------------------
I realize that there are already similar scripts posted on the forum. This was more a learning project for myself--
Let me know what you think...

_________________
.o0[ corey ]0o.


Last edited by freakkk on December 27th, 2005, 12:03 am, edited 4 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 30th, 2005, 1:20 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Nice screenshots. It looks like you've put together a nice framework for a macro/hotkey/hotstring assistant.

This is starting to look a little like the IDE (integrated development environment) some people have been asking about. Such a tool would basically be a GUI front-end for building general-purpose scripts.

Thanks for sharing it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 30th, 2005, 4:45 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
I like the many different features like screen capture - makes things easier thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 30th, 2005, 10:19 pm 
Offline

Joined: July 16th, 2005, 11:39 am
Posts: 96
That is an awesome GUI, very professional-looking.
I was going to work on a front-end to AHK for hotstrings -on-the-fly, but I don't think I'll bother now. Your script fills that functionality.
Excellent tool. Thanks for sharing it.

_________________
“yields falsehood when preceded by its quotation” yields falsehood when preceded by its quotation.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 25th, 2005, 8:46 am 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Hi freakk,

thanks for sharing.

Quote:
it will take screenshot & save it as a JPG.
what are you using to create jpg files? I assume you use Alt+Print to capture the window, right?
I'm looking for a possibility to capture jpg files. Additionally I would like only to cpture a region and not the whole window or screen.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject: very impressive !
PostPosted: August 26th, 2005, 4:40 am 
Offline

Joined: August 25th, 2005, 9:40 pm
Posts: 129
one of the most impressive and useful tools I've seen. Especially like the screen shot grabber.

Suggestion/question:
----------------------
In the autocomplete, if more than one word has similar initial characters, is it possible to show a list of terms and allow user to select choice ? Making it more like intellisense ?

thanks for the tools.

:D
________
Ford Airstream History


Last edited by webber on February 11th, 2011, 5:48 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 28th, 2005, 4:13 am 
Offline

Joined: July 29th, 2005, 5:32 pm
Posts: 179
toralf-
I was originally using a small cmd line app called 'clip2jpg.exe' that was posted by someone on forum (i believe it was bobo actually..)-- but for some reason I can't seem to find the original post now. All it did was convert contents of clipboard to filename you specify. Then when I decided to do the partial snapshot- I decided to use the cmd line options of irfanview.

http://www.irfanview.com/

Heres what I have in this script (there is plenty to cleanup & refine-- but it works.. :) )

Code:
;//////////////////// SCREENSHOT CAMERA /////////////////////////

; CUSTOMIZE PATH TO WHERE YOU HAVE IRANVIEW IS INSTALLED...
irfanviewPATH=C:\Program Files\IrfanView\i_view32.exe

; FOLDER TO SAVE JPG'S IN..
FOLDER=%A_ScriptDir%

; 1 FOR WINDOW & 0 FOR FULLSCREEN SNAPSHOTS
CAPTUREtype=0

;// WINDOW-SCREENSHOT (WIN+SUBTRACT ON NUMBERPAD..) //
#NumpadSub::
Gosub, SCREENSHOTprep

; Run i_view32.exe to trim screenshot that has been dumped to clipboard..
RunWait, `"%irfanviewPATH%`" /clippaste /convert=`"%FOLDER%\%PHOTONAME%.jpg`", , hide

SCREENSHOTcleanup:
PHOTONAME=
return
;------------------------------------------------------------------------------------
SCREENSHOTprep:
IfNotExist, %irfanviewPATH%
   Goto, PROGRAMdoesntEXIST

; takes screenshot...
If CAPTUREtype=1
   Send,!{PRINTSCREEN}
If CAPTUREtype=0
   Send,{PRINTSCREEN}

; determines unique filename..
PHOTONAME=1
Loop,
{
   IfNotExist, %FOLDER%\%PHOTONAME%.JPG
      Break
   IfExist, %FOLDER%\%PHOTONAME%.JPG
   {
      PHOTONAME++
      Continue
   }
}
return
;------------------------------------------------------------------------------------

;//// HOTKEY FOR CUTTING SECTION OF SCREEN (SHIFT+LEFT CLICK/DRAG) ////
Alt & LButton::
CoordMode, Mouse, Screen
If GETTINGarea<>1
{
   GETTINGarea=1
   MouseGetPos, Sxpos, Sypos
   SetTimer, SCREENclipper, 10
   Gosub, CREATEhighlightAREA
   Hotkey, Alt & LButton UP, On
   return
}
return

Alt & LButton UP::
If GETTINGarea=1
{
   GETTINGarea=
   Hotkey, Alt & LButton UP, Off
   SetTimer, SCREENclipper, Off
   Gui, 13:Destroy
   ControlClick , , , , Left, 1, U
   ;msgbox, cutting section of screen..`nX=%Sxpos%, Y=%Sypos%`nWidth=%Expos%`nHeight=%Eypos%
   Gosub, TAKEscreenshotAREA
   return
}
return
;////////////////////////////////////////////////////////////////////////////////////

;// WINDOW AREA HIGHLIGHTING BOX //
CREATEhighlightAREA:
Gui, 13:+owner +AlwaysOnTop
Gui, 13:Color, 808080
Gui, 13:+Lastfound ; Make the GUI window the last found window.
WinSet, TransColor, 808080 120
Gui, 13:-Caption +Border
Gui, 13:Show, X%Sxpos% Y%Sypos% h0 w0, --[Highlighting Section Of Screen For Screen Capture]--
Return
;--------------------------------------------------
; TIMER FOR CUTTING WINDOW AREA FOR SCREENSHOT..
SCREENclipper:
CoordMode, Mouse, Screen
MouseGetPos, Expos, Eypos
EnvSub, Expos, %Sxpos%
EnvSub, Eypos, %Sypos%
WinMove, --[Highlighting Section Of Screen For Screen Capture]--,, %Sxpos%, %Sypos%, %Expos%, %Eypos%
return
;--------------------------------------------------
;// CREATING PARTIAL WINDOW SCREENSHOT.. //
TAKEscreenshotAREA:
TAKEscreenshotAREA=1
Gosub, SCREENSHOTprep

RunWait, `"%irfanviewPATH%`" /clippaste /crop=(%Sxpos%`,%Sypos%`,%Expos%`,%Eypos%)

/convert=`"%FOLDER%\%PHOTONAME%.jpg`", , hide
;msgbox, cutting section of screen..`nX=%Sxpos%, Y=%Sypos%`nWidth=%Expos%`nHeight=%Eypos%
Goto, SCREENSHOTcleanup

PROGRAMdoesntEXIST:
Msgbox, I'm sorry. Irfanview doesn't exist!
Exitapp
;/////////////////////////  END OF SCREENSHOT CAMERA /////////////////////////////////

webber-
Quote:
In the autocomplete, if more than one word has similar initial characters, is it possible to show a list of terms and allow user to select choice ? Making it more like intellisense ?

Currently I have it set up to only show one match at a time-- & pressing & releasing left/right shift scrolls up and down through other matches. I have toyed around w/ revamping it though.. & have considered having option to set how many matches you want to be able to see at a time. I am also planning on having better options for importing words to dictionary & ability to allow different wordlists and/or combinations of wordlists for specific windows. Right now I'm working on improving editor- & adding a bunch of new commands for use w/ hotkey macros.
Thanks for the feedback!

_________________
.o0[ corey ]0o.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 28th, 2005, 7:27 am 
Offline

Joined: August 25th, 2005, 9:40 pm
Posts: 129
Quote:
Currently I have it set up to only show one match at a time-- & pressing & releasing left/right shift scrolls up and down through other matches.


this is what I was missing

It might be easier to have something like left-shift/Ctrl left-shift for scrolling, or allow user to select scroll keys

thanks
________
IPAD ACCESSORIES


Last edited by webber on March 11th, 2011, 12:25 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 28th, 2005, 6:53 pm 
Offline

Joined: July 12th, 2005, 1:21 pm
Posts: 633
Applikation works fine! Image

@Chris
This applikation is also a good example for the performanceproblem of X-Button!
If I close the Gui via X-Button it takes several seconds.
If I use Okay or Cancel it works quite fast!

Thalon


Report this post
Top
 Profile  
Reply with quote  
PostPosted: August 30th, 2005, 6:43 am 
Offline

Joined: August 25th, 2005, 9:40 pm
Posts: 129
can't seem to get the autoreplace to work with this string

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" `n"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


The Exclamation mark seems to throw it off . I tried to escape it but no help there.

Any suggestions on how to get this to work in autoreplace ?
________
EASY VAPE VAPORIZER


Last edited by webber on February 11th, 2011, 5:51 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 31st, 2005, 1:37 am 
Offline

Joined: July 29th, 2005, 5:32 pm
Posts: 179
well-- if you use the auto expand (hotstrings..).. you can put this:
Code:
<{!}DOCTYPE html PUBLIC {"}-//W3C//DTD XHTML 1.0 Transitional//EN{"} `n{"}http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd{"}>

i definately want to enhance the key syntax screen to allow more possibilities/symbols-- but i have the basics included. :D
as far as using auto replace; the way i have it set up right now.. it only really pays attention to letters. its main focus was for simple words or small phrases of words. i could try to improve its functionality-- but how often that sentence come up in conversation anyway!! 8)
for now- statements like yours would work best w/ auto expand.

_________________
.o0[ corey ]0o.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 31st, 2005, 5:55 am 
Offline

Joined: August 25th, 2005, 9:40 pm
Posts: 129
that works!

Sorry, I keep calling it "auto replace" but in your slave it is "auto expand" :oops:
________
HOW TO ROLL JOINTS


Last edited by webber on February 11th, 2011, 5:52 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject: shift keys conflict
PostPosted: September 17th, 2005, 7:32 pm 
Offline

Joined: August 25th, 2005, 9:40 pm
Posts: 129
when scrolling through a list of words for autocomplete, there is a problem with pressing the shift key five times as it triggers "sticky keys" from windows.

Is there a place where I can change the scrolling effect to be something other than the shift keys ?

Extracting this from the exe makes for one very large hard to read ahk file. I presume it isn't all one big script in the source code, but is made up of include files. Is the source code for all of this available ?





..
________
Buy Vapor Genie


Last edited by webber on February 11th, 2011, 5:55 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 17th, 2005, 8:26 pm 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2545
@webber: You could turn off the option to activate the sticky keys menu when shift is pressed 5 times... ;)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 17th, 2005, 8:34 pm 
Offline

Joined: August 25th, 2005, 9:40 pm
Posts: 129
corrupt wrote:
@webber: You could turn off the option to activate the sticky keys menu when shift is pressed 5 times... ;)


I don't see any place to do that
________
Medical marijuana patients


Last edited by webber on February 11th, 2011, 5:55 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 46 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: bowen666, Google Feedfetcher, MSN [Bot], nomissenrojb and 63 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