Search found 1555 matches

by tmplinshi
07 Feb 2020, 07:57
Forum: Ask For Help
Topic: an HTTP GET or POST call to URL
Replies: 12
Views: 1197

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: 433

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: 12
Views: 1197

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: 759

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: 759

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: 606

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 145 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: 524

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: 311

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: 316

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: 4996

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: 4996

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: 4996

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: 4996

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: 2007

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: 2007

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, ...
by tmplinshi
05 Dec 2019, 23:32
Forum: Ask For Help
Topic: Zendesk API
Replies: 6
Views: 1151

Re: Zendesk API

Code: Select all

HTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
HTTP.Open("GET", "https://<myCompanyName>.zendesk.com/api/v2/tickets/<theCaseId>.json")
HTTP.SetCredentials("<userName>", "<password>", 0)
HTTP.Send()

json_str := HTTP.ResponseText

MsgBox % json_str
by tmplinshi
05 Dec 2019, 11:23
Forum: Ask For Help
Topic: Zendesk API
Replies: 6
Views: 1151

Re: Zendesk API

It seems you're using the OAuth access token. Try HTTP.SetRequestHeader("Authorization", "Bearer <superLongToken>")

If you have a working curl command line, it can be very easy translated to AHK code.
by tmplinshi
05 Dec 2019, 06:43
Forum: Ask For Help
Topic: Zendesk API
Replies: 6
Views: 1151

Re: Zendesk API

It should be:
HTTP.SetRequestHeader("Authorization", "Basic <superLongToken>")
or
HTTP.SetCredentials("<Username>", "<Password>", 0)

And..

Code: Select all

URLDownloadToFile, https://<Username>:<Password>@<myCompanyName>.zendesk.com/api/v2/tickets/<theCaseId>.json, zdeskrma.json

Go to advanced search