Search found 1344 matches

by tmplinshi
Today, 08:57
Forum: Ask For Help
Topic: Execute script from URL
Replies: 4
Views: 114

Re: Execute script from URL

If you are sending them the .ahk file, not the compiled exe, then you can just download and override the running script file and then reload. Example: global scriptVersion := "1.10" AutoUpdate() AutoUpdate() { URL_SCRIPT := "https://git.io/fjr4v" URL_VERSION := "https://git.io/fjr4f" whr := ComObjCr...
by tmplinshi
21 Jun 2019, 07:38
Forum: Ask For Help
Topic: Simple shortcut broken after Windows 10 upgrade
Replies: 7
Views: 277

Re: Simple shortcut broken after Windows 10 upgrade

Try:

Code: Select all

^!+t::ComObjCreate("Shell.Application").WindowSwitcher()
by tmplinshi
21 Jun 2019, 01:29
Forum: Ask For Help
Topic: Return focus to selected items on Desktop Topic is solved
Replies: 10
Views: 367

Re: Return focus to selected items on Desktop Topic is solved

Here is a more complex code. The properties dialog can be closed by manually pressing ESC key or clicking the "x" button, it dose not affect the script. F1::OpenCloseProperties() OpenCloseProperties() { OpenCloseProperties.DoIt() } class OpenCloseProperties { DoIt() { if this.isOpened && WinExist("a...
by tmplinshi
20 Jun 2019, 22:04
Forum: Ask For Help
Topic: Return focus to selected items on Desktop Topic is solved
Replies: 10
Views: 367

Re: Return focus to selected items on Desktop Topic is solved

Replace WinActivate, ahk_class %className% with one of following seems to work: WinActivate, ahk_class Progman WinActivate, % "ahk_id " . DllCall("GetShellWindow", "ptr") F1::OpenCloseProperties() OpenCloseProperties() { static isOpened, className if isOpened { Send, {Esc} if className in Progman,Wo...
by tmplinshi
19 Jun 2019, 02:21
Forum: Scripts and Functions
Topic: .NET Framework Interop (CLR, C#, VB)
Replies: 143
Views: 43928

Re: .NET Framework Interop (CLR, C#, VB)

I got an error when running from 64-bit AutoHotkey: (works fine from 32-bit AutoHotkey.) --------------------------- GetScreen.ahk --------------------------- Error: 0x80004003 - Invalid pointer Source: mscorlib Description: Value cannot be null. Parameter name: source HelpFile: (null) HelpContext: ...
by tmplinshi
18 Jun 2019, 15:05
Forum: Wish List
Topic: ToolTip Timeout
Replies: 5
Views: 231

Re: ToolTip Timeout

@TheDewd Nice. But the Timeout parameter shouldn't bind to the function.

Code: Select all

RemoveToolTip := Func("ToolTip").Bind(,,, WhichToolTip)
by tmplinshi
15 Jun 2019, 13:11
Forum: Ask For Help
Topic: Return focus to selected items on Desktop Topic is solved
Replies: 10
Views: 367

Re: Return focus to selected items on Desktop Topic is solved

_class is just a variable name, you can type anything you like. Hope this is more clear to you. F1:: if dialogOpened { Send, {Esc} if className in Progman,WorkerW { WinActivate, ahk_class %className% } dialogOpened := className := "" } else { WinGetClass, className, A Send, !{Enter} dialogOpened := ...
by tmplinshi
15 Jun 2019, 00:17
Forum: Ask For Help
Topic: Return focus to selected items on Desktop Topic is solved
Replies: 10
Views: 367

Re: Return focus to selected items on Desktop Topic is solved

This worked for me.

Code: Select all

F1::
	if _class
	{
		Send, {Esc}
		if _class in Progman,WorkerW
		{
			WinActivate, ahk_class %_class%
		}
		_class := ""
	}
	else
	{
		WinGetClass, _class, A
		Send, !{Enter}
	}
Return
by tmplinshi
14 Jun 2019, 23:52
Forum: Ask For Help
Topic: ActiveX Trigger Event When Page Changes Topic is solved
Replies: 4
Views: 161

Re: ActiveX Trigger Event When Page Changes Topic is solved

Try this, it will list all wb events. #NoEnv #SingleInstance Force SetBatchLines, -1 Gui, Add, ActiveX, w900 h400 vwb, Shell.Explorer Gui, Add, ListView, wp r20 Grid, #|Event Name|Event Params Gui, Show for col, width in [37, 142, 676] LV_ModifyCol(col, width) ComObjConnect(wb, new wbEvent) wb.navig...
by tmplinshi
12 Jun 2019, 21:44
Forum: Ask For Help
Topic: How to add a method to check if the window is (+/- minimized) Topic is solved
Replies: 8
Views: 235

Re: How to add a method to check if the window is (+/- minimized) Topic is solved

Code: Select all

GuiSize(GuiHwnd, EventInfo, Width, Height)
{
	if (EventInfo = 1)
		Tooltip The window has been minimized.
	else if (EventInfo = 0)
		Tooltip The window has been restored
}
Just replace the Tooltip with whatever you want to do.
by tmplinshi
12 Jun 2019, 21:27
Forum: Ask For Help
Topic: How to add a method to check if the window is (+/- minimized) Topic is solved
Replies: 8
Views: 235

Re: How to add a method to check if the window is (+/- minimized) Topic is solved

GuiSize wrote:Launched when the window is resized, minimized, maximized, or restored... A_EventInfo and ErrorLevel will both contain one of the following digits:

0: The window has been restored, or resized normally such as by dragging its edges.
1: The window has been minimized.
2: The window has been maximized.
by tmplinshi
09 Jun 2019, 00:43
Forum: Ask For Help
Topic: Variable and Function Newb Question
Replies: 1
Views: 53

Re: Variable and Function Newb Question

You can do it with Transform or StrReplace . varSCWeekly := "123 %varODATE% 456" varODATE := "HELLO" Transform, OutputVar, Deref, %varSCWeekly% MsgBox, % OutputVar newValue := StrReplace(varSCWeekly, "%varODATE%", varODATE) MsgBox, % newValue Or maybe just combine 3 of them: varSCWeekly_prefix := "1...
by tmplinshi
05 Jun 2019, 22:28
Forum: Scripts and Functions
Topic: Upcoming Ahk2Exe Changes (2019)
Replies: 33
Views: 1623

Re: Upcoming Ahk2Exe Changes (2019)

Thanks!
by tmplinshi
05 Jun 2019, 22:05
Forum: Ask For Help
Topic: Anyone can help to get correct cookie for Wallhaven
Replies: 9
Views: 257

Re: Anyone can help to get correct cookie for Wallhaven

The reason I used a static object oCookie, is to save cookies from each http request, as well as updating same key cookies. The cookies wallhaven_session and XSRF-TOKEN are changing after each http request.
But you can experiment what works better.
by tmplinshi
04 Jun 2019, 09:29
Forum: Ask For Help
Topic: Anyone can help to get correct cookie for Wallhaven
Replies: 9
Views: 257

Re: Anyone can help to get correct cookie for Wallhaven

Login to the same account in multiple scripts (devices) should be fine if the website allows it. Anyway I added .saveCookieToFile() and .loadCookieFromFile() : ; wallhaven.login("Your_Username", "Your_Password") ; wallhaven.addToFavorites("q6g33q") ; wallhaven.saveCookieToFile("wallhaven_cookie.txt"...
by tmplinshi
04 Jun 2019, 08:51
Forum: Ask For Help
Topic: Anyone can help to get correct cookie for Wallhaven
Replies: 9
Views: 257

Re: Anyone can help to get correct cookie for Wallhaven

@gregster You are right, sorry about that. I've modified my previous reply.
by tmplinshi
04 Jun 2019, 01:11
Forum: Ask For Help
Topic: Anyone can help to get correct cookie for Wallhaven
Replies: 9
Views: 257

Re: Anyone can help to get correct cookie for Wallhaven

There is a _token parameter that should be retrieved from login page. 通过抓包你可以看到登录的 POST 请求中有一个 _token 参数,搜索这个 _token 值可得知是来自于登录页面。 wallhaven.login("Your_Username", "Your_Password") wallhaven.addToFavorites("xlj7ko") class wallhaven { login(user, pwd) { ret := this._http("get", "https://wallhaven.cc/...
by tmplinshi
31 May 2019, 09:39
Forum: Ask For Help
Topic: Error using 'run'
Replies: 2
Views: 111

Re: Error using 'run'

I got the same error by double clicking the js file, but works fine from AHK with either of the code: RunWait C:\Windows\System32\WScript.exe D:\Downloads\create_script_control_obj.js RunWait D:\Downloads\create_script_control_obj.js Then I opened Task Manager, and found the reason of it: The workin...
by tmplinshi
30 May 2019, 07:29
Forum: Ask For Help
Topic: Import xlsx into ListView and also Search/Filter data Topic is solved
Replies: 4
Views: 191

Re: Import xlsx into ListView and also Search/Filter data Topic is solved

:arrow: ExcelToArray Quick example: #NoEnv SetBatchLines -1 Gui, Add, ListView, w400 Grid NoSort HWNDhLV, Column 1|Column 2|Column 3 Gui, Add, Edit, wp vKeyword HWNDhEdit gSearchLV, Gui, Show Edit_SetCueBanner(hEdit, "Search...") Goto, ImportXlsx Return ImportXlsx: FileName := "D:\Desktop\test.xlsx"...
by tmplinshi
24 May 2019, 07:07
Forum: Ask For Help
Topic: AccViewer.ahk cannot find control in BabelPad Topic is solved
Replies: 8
Views: 288

Re: AccViewer.ahk cannot find control in BabelPad Topic is solved

acc.png I used a modified version of AccViewer, but the original version works too. Maybe try again with this attachment: AccViewer Source.7z There are 2 files in the attachment: AccViewer Source.exe AccViewer Source.ahk The file AccViewer Source.exe was just renamed from AutoHotkeyU32.exe (v1.1.30...

Go to advanced search