Skip to content

Commit

Permalink
AHK-Toolkit 0.9.0-161030
Browse files Browse the repository at this point in the history
^ ScreenTools
^ HtmlHelp function
^ File Permissions
^ Changelog

- Remove Temporal Hotkeys
- UAC test code
- Imgur API for updating to newest version

* Screen Tool formatting
* Screen Tool formatting
  • Loading branch information
RaptorX committed Oct 30, 2016
1 parent 2f25297 commit b414677
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 66 deletions.
134 changes: 70 additions & 64 deletions AHK-ToolKit.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* =============================================================================================== *
* @Author : RaptorX <graptorx@gmail.com>
* @Script Name : AutoHotkey ToolKit (AHK-ToolKit)
* @Script Version : 0.8.7.2
* @Script Version : 0.9.0-161030
* @Homepage : http://www.autohotkey.com/forum/topic61379.html#376087
*
* @Creation Date : July 11, 2010
Expand All @@ -13,7 +13,7 @@
* This small program is a set of "tools" that i use regularly.
*
* A convenient GUI that serves as a hotkey and hotstring manager allows you to keep all of them
* in an easy to read list.
* in an easy to read list.
*
* The Live Code tab allows you to quickly test ahk code without having to save a file even if
* Autohotkey is not installed in the computer you are using.
Expand Down Expand Up @@ -109,7 +109,7 @@ GroupAdd, ScreenTools, ahk_class triuiScreen
Clipboard := null
global script := { base : scriptobj
,name : "AHK-ToolKit"
,version : "0.8.7.2"
,version : "0.9.0-161030"
,author : "RaptorX"
,email : "graptorx@gmail.com"
,homepage : "http://www.autohotkey.com/forum/topic61379.html#376087"
Expand All @@ -124,10 +124,10 @@ script.getparams(), ForumMenu(), TrayMenu() ; These function are here so that

;[User Configuration]{

if !(a_isadmin) {
Run, *RunAs "%A_ScriptFullPath%"
ExitApp
}
;if !(a_isadmin) {
;Run, *RunAs "%A_ScriptFullPath%"
;ExitApp
;}

global system := {}, sci := {} ; Scintilla array
global conf := ComObjCreate("MSXML2.DOMDocument"), xsl := ComObjCreate("MSXML2.DOMDocument"), root, options, hotkeys, hotstrings
Expand Down Expand Up @@ -3351,7 +3351,7 @@ ListHandler(sParam=0){
GuiControl,07: ChooseString,slGroup, %_current%
sci[4].SetText(unused, _editNode.text)

Gui, 01: +Disable
; Gui, 01: +Disable
Gui, 07: Show
return
}
Expand Down Expand Up @@ -4716,52 +4716,58 @@ WM(var){
^+F12::Suspend, Toggle
^CtrlBreak::Reload

#if options.selectSingleNode("//ScrTools/@altdrag").text && !WinActive("ahk_group ScreenTools")
#if options.selectSingleNode("//ScrTools/@altdrag").text && !WinActive("ahk_group ScreenTools") ;&& !WinActive("Store Manager")
;} Added for correct folding in C++ Lexer (To be removed when finished)
!LButton:: ;{ [Alt + LButton] Capture Active Window/Area
+!LButton:: ;{ [Alt + LButton] Capture Active Window/Area
CoordMode, Mouse, Screen
rect := False
rect := rectBox := False
MouseGetPos, scXL, scYT
WinMove, % "SelBox",, %scXL%, %scYT%
Sleep, 150
if GetKeyState("LButton", "P"){
Gui, 99: Show, w1 h1 x%scXL% y%scYT%, % "SelBox"
WinSet, Transparent, 120, % "SelBox"
While GetKeyState("LButton", "P")
{
; amazing solution by adabo
; first we check which direction we are dragging the mouse
; then we calculate the width and height and finally show the GUI
MouseGetPos, scXR, scYB
if (scXL < scXR) and (scYT < scYB) ; direction - right up
Gui, 99:Show, % "x"(scXL) "y"(scYT) "w"(scXR - scXL) "h"(scYB - scYT), % "SelBox"

if (scXL < scXR) and (scYT > scYB) ; direction - right down
Gui, 99:Show, % "x"(scXL) "y"(scYB) "w"(scXR - scXL) "h"(scYT - scYB), % "SelBox"

if (scXL > scXR) and (scYT < scYB) ; direction - left up
Gui, 99:Show, % "x"(scXR) "y"(scYT) "w"(scXL - scXR) "h"(scYB - scYT), % "SelBox"

if (scXL > scXR) and (scYT > scYB) ; direction - left down
Gui, 99:Show, % "x"(scXR) "y"(scYB) "w"(scXL - scXR) "h"(scYT - scYB), % "SelBox"

WinGetPos,,, guiw, guih, % "SelBox"
ToolTip, % guiw "," guih
if GetKeyState("RButton", "P")
{
ToolTip
Gui, 99: Show, Hide w1 h1 x0 y0, % "SelBox"
return
}
}
ToolTip
Gui, 99: Show, Hide w1 h1 x0 y0, % "SelBox"
outputdebug, % scXL "-" scXR
if (scXL < scXR)
CaptureScreen(scXL "," scYT "," scXR "," scYB, scRect := a_temp . "\scRect_" . rName(0,"png"))
else
CaptureScreen(scXR "," scYB "," scXL "," scYT, scRect := a_temp . "\scRect_" . rName(0,"png"))
rect := True
if GetKeyState("LButton", "P"){

Gui, 99: Show, w1 h1 x%scXL% y%scYT%, % "SelBox"
WinSet, Transparent, 120, % "SelBox"
While GetKeyState("LButton", "P")
{
; amazing solution by adabo
; first we check which direction we are dragging the mouse
; then we calculate the width and height and finally show the GUI
MouseGetPos, scXR, scYB
if (scXL < scXR) and (scYT < scYB) ; direction - right up
Gui, 99:Show, % "x"(scXL) "y"(scYT) "w"(scXR - scXL) "h"(scYB - scYT), % "SelBox"

if (scXL < scXR) and (scYT > scYB) ; direction - right down
Gui, 99:Show, % "x"(scXL) "y"(scYB) "w"(scXR - scXL) "h"(scYT - scYB), % "SelBox"

if (scXL > scXR) and (scYT < scYB) ; direction - left up
Gui, 99:Show, % "x"(scXR) "y"(scYT) "w"(scXL - scXR) "h"(scYB - scYT), % "SelBox"

if (scXL > scXR) and (scYT > scYB) ; direction - left down
Gui, 99:Show, % "x"(scXR) "y"(scYB) "w"(scXL - scXR) "h"(scYT - scYB), % "SelBox"

WinGetPos,,, guiw, guih, % "SelBox"
ToolTip, % guiw "," guih
if GetKeyState("RButton", "P")
{
ToolTip
Gui, 99: Show, Hide w1 h1 x0 y0, % "SelBox"
return
}

; if GetKeyState("LButton", "P")
; rectBox := True
}

ToolTip
Gui, 99: Show, Hide w1 h1 x0 y0, % "SelBox"
outputdebug, % scXL "-" scXR
if (scXL < scXR)
CaptureScreen(scXL "," scYT "," scXR "," scYB, scRect := a_temp . "\scRect_" . rName(0,"png"))
else
CaptureScreen(scXR "," scYB "," scXL "," scYT, scRect := a_temp . "\scRect_" . rName(0,"png"))
rect := True

}

#if options.selectSingleNode("//ScrTools/@prtscr").text
Expand All @@ -4770,17 +4776,17 @@ PrintScreen::
if (!rect)
CaptureScreen(a_thishotkey = "Printscreen" ? 0 : 1, scWin := a_temp . "\scWin_" . rName(0,"png"))

if FileExist(scWin)
if FileExist(scWin)
image := scWin
else if FileExist(scRect)
image := scRect

Tooltip % "Clipboard: " Clipboard := imgUpload(image, "cc6055c88e33af94a7577e2fe845ae66")
Sleep, 5*sec
Tooltip
; Tooltip % "Clipboard: " Clipboard := imgUpload(image, "cc6055c88e33af94a7577e2fe845ae66")
; Sleep, 5*sec
; Tooltip

FileDelete, %scWin%
FileDelete, %scRect%
FileMove, %scWin%, D:\Isaias\Google Drive\Preparados\Temp
FileMove, %scRect%, D:\Isaias\Google Drive\Preparados\Temp
rect := False
return
;}
Expand All @@ -4796,13 +4802,13 @@ return
;}

;{ Temp
Del::Home
pgDn::End
pgUp::PgDn
Home::Ins
End::PgUp
Ins::Del
Appskey::RWin
; Del::Home
; pgDn::End
; pgUp::PgDn
; Home::Ins
; End::PgUp
; Ins::Del
; Appskey::RWin

#ifwinactive, .*Nikronius
pgDn::Send !{Space}n
Expand Down Expand Up @@ -4848,13 +4854,13 @@ Exe_File=%In_Dir%\lib\AHK-ToolKit.exe
Alt_Bin=C:\Program Files\AutoHotkeyW\Compiler\AutoHotkeySC.bin
[VERSION]
Set_Version_Info=1
File_Version=0.8.7.2
File_Version=0.9.0-161030
Inc_File_Version=0
Internal_Name=AHK-TK
Legal_Copyright=GNU General Public License 3.0
Original_Filename=AutoHotkey Toolkit.exe
Product_Name=AutoHotkey Toolkit
Product_Version=0.8.7.2
Product_Version=0.9.0-161030
[ICONS]
Icon_1=%In_Dir%\res\AHK-TK.ico
Icon_2=%In_Dir%\res\AHK-TK.ico
Expand Down
7 changes: 5 additions & 2 deletions lib/htmlhelp.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@

if !DllCall("hhctrl.ocx\HtmlHelp", "Ptr", hwndCaller, "Str", pszFile, "Uint", HH_KEYWORD_LOOKUP, "Ptr", &HH_AKLINK)
{
SetTitleMatchMode, 2
Run, % pszFile
Sleep 1000
Send, !n%clipboard%{Enter}
WinWait, AutoHotkey Help
WinActivate, AutoHotkey Help
if WinActive("AutoHotkey Help")
Send, !n%clipboard%{Enter}
}
return 0
}

0 comments on commit b414677

Please sign in to comment.