Search found 82 matches

by stealzy
28 Feb 2017, 07:40
Forum: Scripts and Functions
Topic: ★☆GetHTMLFragment()★☆
Replies: 14
Views: 3845

Re: ★☆GetHTMLFragment()★☆

Firefox 47, Win7. Select "Simple Instructions:" line on this topic page: <HTML><HEAD></HEAD> <BODY>Version:0.9 StartHTML:00000201 EndHTML:00000291 StartFragment:00000235 EndFragment:00000255 SourceURL:https://autohotkey.com/boards/viewtopic.php?f=6&t=28608&sid=984 .... ML:00000291 StartFragment:0000...
by stealzy
17 Feb 2017, 13:24
Forum: Scripts and Functions
Topic: [CLASS] Lyt - Keyboard layout (language) operation
Replies: 27
Views: 5201

[CLASS] Lyt - Keyboard layout (language) operation

Class and example usage: #SingleInstance force Loop % Lyt.GetList().MaxIndex() str .= A_Index ": " Lyt.GetList()[A_Index].LocName " - " Lyt.GetList()[A_Index].LayoutName . "`n" Format("{:#010x}", Lyt.GetList()[A_Index].hkl) "`n" MsgBox,, Your system loaded layout list, % str "`n" defaulSystemLayout ...
by stealzy
17 Feb 2017, 11:09
Forum: Scripts and Functions
Topic: Copy filepath to clipboard in Windows Explorer
Replies: 15
Views: 6819

Re: Copy filepath to clipboard in Windows Explorer

Hotkey IfWinActive, ahk_class CabinetWClass Hotkey +^vk43, Explorer_CopySelPath Explorer_CopySelPath() { if Path := _GetSelection() Clipboard := Path } _GetSelection(hwnd="") { hwnd := hwnd? hwnd:WinExist("A") WinGetClass class, ahk_id %hwnd% if (class ~= "Progman|WorkerW") { ControlGet, files, Lis...
by stealzy
15 Feb 2017, 09:48
Forum: Tutorials
Topic: Classes in AHK, Basic tutorial.
Replies: 24
Views: 38718

Re: Classes in AHK, Basic tutorial.

Code: Select all

Class A {
	Static x := 1
	y := 2
	__New() {
		This.z := 3 ; there should be a function, there is the Static section for constants
	}
}
B := A, C := new A
MsgBox % "x=" B.x "`ty=" B.y "`tz=" B.z "`nx=" C.x "`ty=" C.y "`tz=" C.z
by stealzy
24 Jan 2017, 04:39
Forum: Scripts and Functions
Topic: gdip "mechanical" clock timer
Replies: 18
Views: 2991

Re: gdip "mechanical" clock timer

I put gdip_all.ahk in Lib folder an rename it to gdip.ahk, then it works.
by stealzy
23 Jan 2017, 11:29
Forum: Scripts and Functions
Topic: gdip "mechanical" clock timer
Replies: 18
Views: 2991

Re: gdip "mechanical" clock timer

I run "alarm timer.ahk" and see nothing. Win7 x64, AutoHotkey_L 1.1.24.0, Gdip.ahk downloaded by link in script. 1821: Return,DllCall("gdiplus\GdipDeleteBrush", "uint", pBrush) ---- D:\Soft\Programming\Automate\AHK\scripts\gui\alarm timer.ahk 584: Gdip_DeleteStringFormat(hFormat) ---- C:\Users\Arya\...
by stealzy
17 Sep 2016, 14:12
Forum: Wish List
Topic: Checks if a value exists in an array
Replies: 18
Views: 11906

Re: Checks if a value exists in an array

I rewrite it without slow .MaxIndex() method. There is not necessary to check IsObject() and Length() even in this case, because 0 return for non-object and zero-length object. x:=4, Arr:=[0, 4, 5, 7, 4, 4, "z"] MsgBox % "x:=4, Arr:=[0, 4, 5, 7, 4, 4, ""z""]`nindexOf(Arr, x) = " indexOf(Arr, x) "`ni...
by stealzy
12 Sep 2016, 00:40
Forum: Scripts and Functions
Topic: Get the URL of the current (active) browser tab
Replies: 126
Views: 52532

Re: Get the URL of the current (active) browser tab

iseahound , thank you, captain obvious! In my second sample of code you can see static variables and other changes. I wrote this not for me, but for TC. 1) If you run my second code, you can understand, how speed-up works. It search for URL among all Acc controls, then save id of url control in sta...
by stealzy
11 Sep 2016, 07:23
Forum: Scripts and Functions
Topic: Get the URL of the current (active) browser tab
Replies: 126
Views: 52532

Re: Get the URL of the current (active) browser tab

Common wishes: don't use global variables; remove from function WinGetClass, sClass, A - this generate questions like: "how get url in not active browser window".
by stealzy
11 Sep 2016, 03:22
Forum: Scripts and Functions
Topic: Get the URL of the current (active) browser tab
Replies: 126
Views: 52532

Re: Get the URL of the current (active) browser tab

Acc method search control with url too long for firefox (2600 ms - GetAddressBar() is called 360! times ) vs DDE (31 ms function). For modern Opera GetAddressBar() is called 47 times. Maybe we can to narrow the search, using AccPath? Regex in IsURL() is overhead. Also, you can't detect "chrome://ext...
by stealzy
10 Sep 2016, 14:19
Forum: Scripts and Functions
Topic: ReloadANSIasUTF() - run UTF-8 (without BOM) script as UTF-8
Replies: 1
Views: 933

ReloadANSIasUTF() - run UTF-8 (without BOM) script as UTF-8

As you maybe know, Autohotkey not recognize UTF without BOM. The default ANSI codepage is used for all script without BOM. Lexikos explanations. They say notepad.exe adds a BOM to any file saved as UTF-8. It's true. If you use :? notepad.exe for edit your scripts. But standart is UTF-8 without BOM! ...
by stealzy
10 Sep 2016, 09:31
Forum: Wish List
Topic: Checks if a value exists in an array
Replies: 18
Views: 11906

Re: Checks if a value exists in an array

jNizM , my code return index of element, your code return 1. There is not necessary to check IsObjet() and .Length() in my case. And there is no need aplly this function to string. Do you use .MaxIndex() to string? I'm not. Associative arrays are not the subject of discussion. So, I stand by my opi...
by stealzy
08 Sep 2016, 01:10
Forum: Wish List
Topic: Checks if a value exists in an array
Replies: 18
Views: 11906

Re: Checks if a value exists in an array

I found similar topic: More Simple Array Commands
by stealzy
06 Sep 2016, 13:34
Forum: Scripts and Functions
Topic: VirusTotal HashChecker - check files for viruses
Replies: 2
Views: 855

VirusTotal HashChecker - check files for viruses

Check files for malware, by calculating the checksum and search it on VirusTotal, by sending url-request. Кesults are displayed in browser. http://funkyimg.com/p/2gnxR.png https://github.com/stealzy/VirusTotalHashChecker After intallation, you'll have item in context menu. Comparison vs native uploa...
by stealzy
06 Sep 2016, 12:33
Forum: Wish List
Topic: Checks if a value exists in an array
Replies: 18
Views: 11906

Re: Checks if a value exists in an array

It seems, my suggestion is still shortest and practical :=).
by stealzy
06 Sep 2016, 07:20
Forum: Wish List
Topic: Checks if a value exists in an array
Replies: 18
Views: 11906

Checks if a value exists in an array

There are often used combine items into a single string instead of an array. You can check if a value exists in this "array" by searching in this string: stringArray := item1 . item2 . item3 IfInString, x, stringArray ; Another workaround: (x ~= "MyRegExp1|MyRegExp2|MyRegExp3") ; Another workaround:...
by stealzy
03 Aug 2016, 10:56
Forum: Bug Reports
Topic: "Alt+Shift" shortcut to change language & ~*Alt Up hotkey
Replies: 0
Views: 885

"Alt+Shift" shortcut to change language & ~*Alt Up hotkey

You need to have "Alt+Shift" shortcut to change layout(language) in windows to reproduce this bug.
Run this script:

Code: Select all

~*Alt Up::
	ToolTip Ok
	SetTimer, ToolTipOff, 500
	Return

ToolTipOff:
	ToolTip
	Return
Press Alt & Shift keys. If you release Alt key, holding down Shift, layout will not change.
by stealzy
28 Jan 2016, 10:07
Forum: Scripts and Functions
Topic: UrlDownloadToVar [AHK 1.1]
Replies: 13
Views: 7365

Re: UrlDownloadToVar [AHK 1.1]

UrlDownloadToVar(URL, Referer="", UserAgent="", Cookie="", TimeoutSec=-1, Proxy="", ProxyBypassList="", EnableRedirects="", URLCodePage="", Charset="") { ; If (Error) {put explanation in ErrorLevel; return false;} ; autors: stealzy, tuzi ; https://autohotkey.com/boards/viewtopic.php?f=6&t=12368&p=6...
by stealzy
01 Jan 2016, 07:16
Forum: Wish List
Topic: AutoHotkey do not take command line switches for compiled script
Replies: 5
Views: 1152

Re: AutoHotkey do not take command line switches for compiled script

Sorry my english, I badly expressed. I want give /R /restart /F /force /ErrorStdOut into my compiler script. I want my compiler script get these switches. But AutoHotkey take these switches itself. if %0%>0 { Loop, %0% { param := %A_Index% if (param = "/f") MsgBox Impossible! How can I be here? It i...

Go to advanced search