Search found 1598 matches

by tmplinshi
26 Jun 2020, 02:30
Forum: 请求帮助
Topic: 请教如何实现Ctrl+C与Ctrl+C+C功能不同 Topic is solved
Replies: 3
Views: 62265

Re: 请教如何实现Ctrl+C与Ctrl+C+C功能不同 Topic is solved

试试这样: ~^c:: if IsDoubleClick() ToolTip(StrLen(Clipboard),,,, 2000) Return IsDoubleClick() { static doubleClickTime := DllCall("GetDoubleClickTime") KeyWait, % LTrim(A_ThisHotkey, "~") return (A_ThisHotKey = A_PriorHotKey) && (A_TimeSincePriorHotkey <= doubleClickTime) } ToolTip(Text := "", X := "", ...
by tmplinshi
10 Jun 2020, 07:44
Forum: 请求帮助
Topic: 右击托盘图标 Topic is solved
Replies: 6
Views: 62281

Re: 右击托盘图标 Topic is solved

你好,

你需要调用 TrayIcon_Button 这个函数, 而不是去修改它.

Code: Select all

#Include TrayIcon.ahk ; 或者完整路径 D:\Desktop\TrayIcon.ahk

TrayIcon_Button("Shadowsocks.exe", "R")
点击弹出的右键菜单可参考这个脚本:
https://github.com/tmplinshi/RegSsHotkey/blob/master/Lib/RegisterShadowsocksHotkey.ahk
by tmplinshi
08 Jun 2020, 05:23
Forum: Ask For Help
Topic: an HTTP GET or POST call to URL
Replies: 16
Views: 3872

Re: an HTTP GET or POST call to URL

BoBo The simple answer to the question How to generate access token using refresh token through google drive API? : If you are using web api then you should make a http POST call to URL : https://www.googleapis.com/oauth2/v4/token with following request body client_id: <YOUR_CLIENT_ID> client_secre...
by tmplinshi
07 Feb 2020, 07:57
Forum: Ask For Help
Topic: an HTTP GET or POST call to URL
Replies: 16
Views: 3872

Re: an HTTP GET or POST call to URL

Yes. There will be errors like timeout, etc..
by tmplinshi
06 Feb 2020, 23:23
Forum: Ask For Help
Topic: WinHttp post request
Replies: 4
Views: 1270

Re: WinHttp post request

There are mainly 3 types of POST data. application/x-www-form-urlencoded example body: name=admin&shoesize=12 application/json example body: {"name":"admin", "shoesize":12} multipart/form-data It's normally used for uploading binary file. CreateFormData is only used for this type. The body is a json...
by tmplinshi
06 Feb 2020, 23:11
Forum: Ask For Help
Topic: an HTTP GET or POST call to URL
Replies: 16
Views: 3872

Re: an HTTP GET or POST call to URL

You can make an HTTP GET or HTTP POST request, according to its API . GET request whr := ComObjCreate("WinHttp.WinHttpRequest.5.1") whr.Open("GET", "https://se-1.cellsynt.net/sms.php?username=demo&password=test123&destination=0046700123123&originatortype=numeric&originator=46700456456&charset=UTF-8&...
by tmplinshi
21 Dec 2019, 00:48
Forum: Ask For Help
Topic: Revo Uninstaller commandline Topic is solved
Replies: 6
Views: 959

Re: Revo Uninstaller commandline Topic is solved

I just installed "Revo Uninstaller Pro", executing RevoCmd.exe /? output this: RevoCmd.png There are no /export /all /html options. These options are coming from RevoUninPro.exe , not RevoCmd.exe . RunWait, "C:\Program Files\VS Revo Group\Revo Uninstaller Pro\RevoUninPro.exe" /export "d:\test.html" ...
by tmplinshi
20 Dec 2019, 12:23
Forum: Ask For Help
Topic: Revo Uninstaller commandline Topic is solved
Replies: 6
Views: 959

Re: Revo Uninstaller commandline Topic is solved

Code: Select all

run,  cmd /k "C:\Program Files\VS Revo Group\Revo Uninstaller Pro\RevoCmd.exe" /export "c:\test.html" /all /html
See if there is any error messages in the cmd window.
by tmplinshi
17 Dec 2019, 16:02
Forum: Ask For Help
Topic: In your opinion, what's the best way to create a custom ListView?
Replies: 5
Views: 759

Re: In your opinion, what's the best way to create a custom ListView?

An example using XCGUI
screenshot.png
screenshot.png (311.01 KiB) Viewed 298 times
Source
by tmplinshi
15 Dec 2019, 08:05
Forum: Ask For Help
Topic: Can you please share a working Binary to Base64 Encode function? Topic is solved
Replies: 4
Views: 862

Re: Can you please share a working Binary to Base64 Encode function? Topic is solved

Works fine here. The following example will encode AutoHotkey.exe to base64, and then decode it to ahkCopy.exe . I've also tried a command line tool base64 , it can decode it back. b64 := Base64Enc_FromFile(A_AhkPath) Base64Dec_ToFile(b64, "ahkCopy.exe") Run, cmd /c echo MsgBox hello | ahkCopy.exe *...
by tmplinshi
11 Dec 2019, 01:11
Forum: Ask For Help
Topic: Video to Gif, Command Prompt Correct Syntax Topic is solved
Replies: 2
Views: 418

Re: Video to Gif, Command Prompt Correct Syntax Topic is solved

The pipe symbol is the syntax of the batch language, you need to run the command in cmd.exe.

Code: Select all

Runwait, cmd /c "%FFMPeg%" %gif_param%
by tmplinshi
10 Dec 2019, 08:18
Forum: Ask For Help
Topic: textbox inside a menu
Replies: 2
Views: 412

Re: textbox inside a menu

Like this? lv.png Gui, -Caption +ToolWindow Gui, Font, s12, Arial Gui, Margin, 0, 0 Gui, Add, Edit, w200 gInputChanged vkw, Gui, Add, ListView, y+-1 w200 h200 +HWNDhLV -Hdr AltSubmit gLvEvent, Items Loop, 10 { LV_Add("", "Item-" A_Index) } LV_ModifyCol(1, 179) lvCtrl_SetRowHeight(30) lvCtrl_SetWindo...
by tmplinshi
08 Dec 2019, 12:06
Forum: Ask For Help
Topic: convert InternetFileRead() to unicode Topic is solved
Replies: 24
Views: 5437

Re: convert InternetFileRead() to unicode Topic is solved

@teadrinker Not sure if you can just check the OS version.

Code: Select all

if (A_OSVersion ~= "10\.\d+\.\d+")
	headers := "Accept-Encoding: gzip, deflate, br"
else
	headers := "Accept-Encoding: gzip, deflate"
by tmplinshi
07 Dec 2019, 13:35
Forum: Ask For Help
Topic: convert InternetFileRead() to unicode Topic is solved
Replies: 24
Views: 5437

Re: convert InternetFileRead() to unicode Topic is solved

Works fine here (OS: Win10). I think that's because your system doesn't support decoding Brotli (br). MsgBox % GetContentEncoding("https://www.youtube.com/") ; br MsgBox % GetContentEncoding("https://www.autohotkey.com/boards/") ; gzip GetContentEncoding(Url) { whr := ComObjCreate("WinHttp.WinHttpRe...
by tmplinshi
07 Dec 2019, 12:41
Forum: Ask For Help
Topic: convert InternetFileRead() to unicode Topic is solved
Replies: 24
Views: 5437

Re: convert InternetFileRead() to unicode Topic is solved

The length returned by DataFromUrl_tmp is already gzip decoded, so the length will be the same as your original function. If you comment the line DllCall("Wininet\InternetSetOption".... , you'll see the size will be different, but wait, you can't use "https://imgur.com/" to test, because this url wi...
by tmplinshi
07 Dec 2019, 11:28
Forum: Ask For Help
Topic: convert InternetFileRead() to unicode Topic is solved
Replies: 24
Views: 5437

Re: convert InternetFileRead() to unicode Topic is solved

Hello, I added gzip decoding support :wave: (Changes I made: Added InternetSetOption , and modified InternetOpenUrl ) url := "https://httpbin.org/brotli" url := "https://httpbin.org/gzip" if length := DataFromUrl_tmp(url, data) { html := StrGet(&data, length, "utf-8") MsgBox, % html } DataFromUrl_tm...
by tmplinshi
07 Dec 2019, 08:22
Forum: Ask For Help
Topic: Help in scripting subMenus Topic is solved
Replies: 6
Views: 2166

Re: Help in scripting subMenus Topic is solved

The simple code you provided is better. The textMenu function is just more convenient to configure the menu, without writting the Menu codes.
by tmplinshi
07 Dec 2019, 06:47
Forum: Ask For Help
Topic: Help in scripting subMenus Topic is solved
Replies: 6
Views: 2166

Re: Help in scripting subMenus Topic is solved

Maybe try to change the hotkey F1 to another key. menuData = ( subMenu1 item1 = a item2 = b subMenu2 item3 = c item4 = d ) menu1 := new textMenu(menuData, "OnMenuSelect") return :X:nu::menu1.show() OnMenuSelect(Command) { SendInput, {Text}%Command% } class textMenu { __New(ByRef VariableOrFileName, ...

Go to advanced search