Pole Magnet Checkmate Shoot Blog Post-Pillar Erection Mast Staff Woody Boner Message Delivery Slice of Toast Cut Section Blade Scythe Slit Slip Tool Member Syringe Micro Lance Piston Hypodermic Sharp Knife Sword Blade Skewer Scalpel Tip Junk Yard Tooltip Pin Cripple Ripple Point Prick Spike Cactus Point Teeth Locksmith Pickar Chisel Hack Saw Chain Saw Microscopic Spot Bit Byte Biter Mosquito Throw Missile Conscious Nail Digit Finger Solder Iron Silver Needle Bayonet Spear Axe Segment Selection Matrix Port Selector Mixer Unit Switch Opposite Obstacle Counter Anti Pro Con Fuck Stick Bullet Proof Flame Proof Water Proof Shock Proof Future Proof Pilot Pen Squawk Code 7500 Seven Five Man With A Knife Profane Pen Shakespeare Macbeth Romeo Juliet Arrow Heart Pump Red-Stop Traffic Passion-Go Vocabulary-Constabulary Mind Police Thought Police Audio Book Mind Reader Telepathy Silver Door

Saturday 21 April 2018

AutoKey -- 02-(SAVE AS) KEY ENTER.ahk

All The Coder Project Set Are Now With GitHub
Where Maintain UpToDate All the Time
----
Matthew-Lancaster/Matthew-Lancaster: A Collection of Scripts For AutohotKeys, Dos Batch Command, VBScript, VB6, VB2008, Grub4Dos, Reg Keys, Win Powershell, SMTP
https://github.com/Matthew-Lancaster/matthew-lancaster

----

The Project Here At GitGub
----
Matthew-Lancaster/Autokey -- 02-SAVE AS KEY ENTER.ahk
https://github.com/Matthew-Lancaster/Matthew-Lancaster/blob/master/SCRIPTER%20CODE%20--%20AUTOHOTKEY/Autokey%20--%2002-SAVE%20AS%20KEY%20ENTER.ahk
----
Editor

[ Tuesday 10:30:00 Am_07 May 2019 ]


AutoHotKeys Project Code to Use Press Enter Key on (Save As) Window Dialogue in Chrome.exe & Pause On a Timer 120 Sec When Chrome.exe Gone

Over
~
Matthew
[ Saturday 08:41:40 Am_21 April 2018 ]

----------
CODE BEGIN
----------
;# __ C:\SCRIPTER\SCRIPTER CODE -- AUTOKEY\Autokey -- 02-SAVE AS KEY ENTER.ahk
;# __ 
;# __ Autokey -- 02-SAVE AS KEY ENTER.ahk
;# __ 
;# BY Matthew __ Matt.Lan@Btinternet.com
;# __ 
;# Thu 25 Aug 2016 01:47:51 Work Time Beginner
;# Thu 25 Aug 2016 03:00:00 3 Hour
;# Thu 25-Aug-2016 06:16:41 2nd Wave of Work Better Coder Emerged
;# Thu 25-Aug-2016 16:31:00 40 Minute
;# Thu 25-Aug-2016 11:20:00 3RD WAVE 
;# Thu 25-Aug-2016 16:31:00 5 & Half Hour
;# Sat 21-Apr-2018 07:24:30 4TH WAVE Massively Better
;# Sat 21-Apr-2018 08:28:00 1 Hour
;# __ 

;--------------------------------------------------------------------
; AutoHotKeys Project Code to User Press Enter Key on (Save As) Window  Dialogue in Chrome.exe & Exit On a Timer 120 Sec When Chrome.exe Gone

;
;--------------------------------------------------------------------
; First Wave Bash
; ---------------
; Thu 25 Aug 2016 01:47:51 -- Length Time 1hr 45M - Finish Code
; Thu 25 Aug 2016 02:35:00 -- Length Time+2hr 30M - Fine Tune & Doc
; Thu 25 Aug 2016 03:00:00 -- Length Time+3hr 00M - Publish On-line

; A Second Session Bash __ Dawn
; ------------------------------------------------
; Thu 25-Aug-2016 06:16:41 --
; Thu 25 Aug 2016 07:00:00 -- Length Time 0 hr 40 Min -- Tune Doc & Publish

; A Third Session Bash __ Morning
; Thu 25-Aug-2016 11:20:00 
; Thu 25-Aug-2016 14:59:29
; Thu 25-Aug-2016 16:31:00 -- 11 TO 4pm 5 Half Hour Hurt Ouch

; A Fourth Session Improved Code Dramatically
; ------------------------------------------
; Sat 21-Apr-2018 07:24:30 -- BEGINNER
; Sat 21-Apr-2018 08:28:00 -- 1 HOUR WITH PUBLISH ON-LINE
;--------------------------------------------------------------------

;--------------------------------------------------------------------
; 2nd Project in a Line of AutoKey -- First On Blogger Here
; This is All Copy Paste in and Go Project for AutoHotKeys Working
; Building Block Head Start
;--------------------------------------------------------------------


; BEGIN CODE
;--------------------
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

#SingleInstance force
;--------------------
; SingleInstance Force Reduce Question at Reload
;--------------------

;--------------------------------------------------------------------
#Persistent
; A code block to use around --- Persistent

;--------------------------------------------------------------------

SoundBeep , 2000 , 200
SoundBeep , 2500 , 100

pause
soundbeep , 1100,100

SetTimer TIMER_Main_Code,1000
SetTimer TIMER_PREVIOUS_INSTANCE,1

Return

;----------------------------------------------------------------------
TIMER_Main_Code:

    If WinExist("ahk_class Chrome_WidgetWin_1")
    {
        WinGet, HWND, ID, Save As
        WinGetClass, This_Class, ahk_id %HWND%
        WinGet, path, ProcessName, ahk_id %HWND%
        WinGetText, OutputVar, ahk_id %HWND%
        WinGetPos, WinLeft, WinTop, WinWidth, WinHeight, ahk_id %HWND%

        ; Multiple If-And Statement With Separated Lines
        ; ----------------------------------------------
        IF (This_Class="#32770" 
        and PATH="Chrome.exe")
        {
            SoundBeep , 1200, 100
            SoundBeep , 2500 , 100
            ControlClick, &Save, Save As
        }
    }
    
    WinGet, HWND, ID, A
    WinGetClass, This_Class, ahk_id %HWND%
    IF This_Class=Chrome_WidgetWin_1 
        Var_Count = 0

    IF This_Class <> Chrome_WidgetWin_1 
        Var_Count += 1
        
    if Var_Count > 120
        {
            SoundBeep , 1100,100
            Pause
            SoundBeep , 1100,100
            Var_Count = 0
        }
Return

TIMER_PREVIOUS_INSTANCE:
SetTimer TIMER_PREVIOUS_INSTANCE,10000
if ScriptInstanceExist()
{
    Exitapp
}
return

ScriptInstanceExist() {
    static title := " - AutoHotkey v" A_AhkVersion
    dhw := A_DetectHiddenWindows
    DetectHiddenWindows, On
    WinGet, match, List, % A_ScriptFullPath . title
    DetectHiddenWindows, % dhw
    return (match > 1)
    }
Return

;# ------------------------------------------------------------------
EOF:                           ; on exit
ExitApp     
;# ------------------------------------------------------------------

; Register a function to be called on exit:
OnExit("ExitFunc")

; Register an object to be called on exit:
OnExit(ObjBindMethod(MyObject, "Exiting"))

;# ------------------------------------------------------------------
ExitFunc(ExitReason, ExitCode)
{
    if ExitReason not in Logoff,Shutdown
    {
        ;MsgBox, 4, , Are you sure you want to exit?
        ;IfMsgBox, No
        ;    return 1  ; OnExit functions must return non-zero to prevent exit.
    }
    ; Do not call ExitApp -- that would prevent other OnExit functions from being called.
}

class MyObject
{
    Exiting()
    {
        ;
        ;MsgBox, MyObject is cleaning up prior to exiting...
        /*
        this.SayGoodbye()
        this.CloseNetworkConnections()
        */
    }
}
;# ------------------------------------------------------------------
; exit the app


;--------------------------------------------------------------------
; Work Note Rather Novice at First Began
;--------------------------------------------------------------------
; Yes Fixed the Error Variable Increment -- Seem Like a C++ Method Style -- TEST_VAR += 1

; This Program Has Problem in Win 10 The Dialog to Save Do Stay So Move On After Save to Next Icon to Do Save JPG Screenshot
; ----
; Save as Shortcut - Chrome Web Store
; https://chrome.google.com/webstore/detail/save-as-shortcut/flehofiklehmnnolpjcamplcnmhgcbkk?utm_source=chrome-app-launcher-info-dialog
; ----

; A Tip to Learn With This Program is 
; When Ask to Save Select JPG From PNG and It will Remember
; ----
; Capture Webpage Screenshot Entirely. FireShot - Chrome Web Store
; https://chrome.google.com/webstore/detail/capture-webpage-screensho/mcbpblocgmgfnpjjppndjkmgjaogfceg?utm_source=chrome-app-launcher-info-dialog
; ----
;--------------------------------------------------------------------
; Work Logg -- Start time not that clear
; Yes Found Time Begin Phew Charging Someone for This Automation -- RSI Injury


;--------------------------------------------------------------------
;--------------------------------------------------------------------
; Info Note
;--------------------------------------------------------------------

; Use of these 4 Link in Turn to Save Page of the Chrome Extension
;--------------------------------------------------------------------
; 1.. Copy All Urls - Chrome Web Store
; 2.. Save as Shortcut - Chrome Web Store
; 3.. Capture Webpage Screenshot Entirely. FireShot - Chrome Web Store
; 4.. SingleFile - Chrome Web Store -- to Save an HTML Version
;--------------------------------------------------------------------

;--------------------------------------------------------------------
;--------------------------------------------------------------------
;Ref: - Credit to Source Helper Ref:
;--------------------------------------------------------------------
;--------------------------------------------------------------------
;AutoKey Source to Learn
;--------------------------------------------------------------------
;Begin Here Google Search
;--------------------------------------------------------------------
;1..
;How to save files using Enter key? - Ask for Help - AutoHotkey Community
;https://autohotkey.com/board/topic/124006-how-to-save-files-using-enter-key/

;--------------------------------------------------------------------
;AutoKey Info Help Web
;--------------------------------------------------------------------
;1..
;OnExit
;https://autohotkey.com/docs/commands/OnExit.htm
;--------
;2..
;While-loop
;https://autohotkey.com/docs/commands/While.htm
;--------
;3..
;Else
;https://autohotkey.com/docs/commands/Else.htm
;--------
;4..
;OnExit
;https://autohotkey.com/docs/commands/OnExit.htm
;--------
;5..
;Functions
;https://autohotkey.com/docs/Functions.htm
;--------------------------------------------------------------------

;--------------------------------------------------------------------
;Ref
;Chrome Extension
;--------------------------------------------------------------------

;1..
;--------
;This One not Much To do With Here But Still Used
;--------
;Copy All Urls - Chrome Web Store
;https://chrome.google.com/webstore/detail/copy-all-urls/djdmadneanknadilpjiknlnanaolmbfk?utm_source=chrome-app-launcher-info-dialog
;--------

;2..
;--------
;Yes Save to URL to Download Folder
;--------
;Save as Shortcut - Chrome Web Store
;https://chrome.google.com/webstore/detail/save-as-shortcut/flehofiklehmnnolpjcamplcnmhgcbkk?utm_source=chrome-app-launcher-info-dialog
;--------

;3..
;--------
;This One Save Auto to Download Folder Without Our Coding Requirement
;--------
;Capture Webpage Screenshot Entirely. FireShot - Chrome Web Store
;https://chrome.google.com/webstore/detail/capture-webpage-screensho/mcbpblocgmgfnpjjppndjkmgjaogfceg?utm_source=chrome-app-launcher-info-dialog
;--------

;4..
;--------
;As Well as Save Screen Shot About Do a Web Page HTML Save also
;Be Good If Done Without an Extra Ask to Download Save As
;But Setup to Store a Page on a Web On-line Auto -- PageArchiver
;--------
;SingleFile - Chrome Web Store
;https://chrome.google.com/webstore/detail/singlefile/mpiodijhokgodhhofbcjdecpffjipkle?utm_source=chrome-app-launcher-info-dialog
;--------------------------------------------------------------------


;--------------------------------------------------------------------
;SEMI USELESS CODE SHOVED TO BOTTOM LOOK AT LATER
;--------------------------------------------------------------------
;WinGet nChromeWindows, Count, ahk_class Chrome_WidgetWin_1

;----
;[Solved] How to get the hwnd of the current script - Ask for Help - AutoHotkey Community
;https://autohotkey.com/board/topic/35140-solved-how-to-get-the-hwnd-of-the-current-script/
;----
;ThisScriptsHWND := WinExist("Ahk_PID " DllCall("GetCurrentProcessId"))
;msgbox %ThisScriptsHWND% is this script's HWND

;--------------------------------------------------------------------
;Don't stay RSI -Save Me- if Form Change
;--------------------------------------------------------------------
;WinGetTitle, active_title, A
;IF active_title <> O_active_title
;{
;    SoundBeep
;    break
;}
;O_active_title = %active_title%

No comments: