Search found 1602 matches
- 07 Dec 2019, 12:41
- Forum: Ask for Help (v1)
- Topic: convert InternetFileRead() to unicode Topic is solved
- Replies: 24
- Views: 6562
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...
- 07 Dec 2019, 11:28
- Forum: Ask for Help (v1)
- Topic: convert InternetFileRead() to unicode Topic is solved
- Replies: 24
- Views: 6562
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...
- 07 Dec 2019, 08:22
- Forum: Ask for Help (v1)
- Topic: Help in scripting subMenus Topic is solved
- Replies: 6
- Views: 2643
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.
- 07 Dec 2019, 06:47
- Forum: Ask for Help (v1)
- Topic: Help in scripting subMenus Topic is solved
- Replies: 6
- Views: 2643
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, ...
- 07 Dec 2019, 03:36
- Forum: Ask for Help (v1)
- Topic: Help in scripting subMenus Topic is solved
- Replies: 6
- Views: 2643
Re: Help in scripting subMenus Topic is solved
Hello, see if this helps
https://www.autohotkey.com/boards/viewtopic.php?t=66278#p285071
https://www.autohotkey.com/boards/viewtopic.php?t=66278#p285071
- 05 Dec 2019, 23:32
- Forum: Ask for Help (v1)
- Topic: Zendesk API
- Replies: 6
- Views: 1732
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
- 05 Dec 2019, 11:23
- Forum: Ask for Help (v1)
- Topic: Zendesk API
- Replies: 6
- Views: 1732
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.
If you have a working curl command line, it can be very easy translated to AHK code.
- 05 Dec 2019, 06:43
- Forum: Ask for Help (v1)
- Topic: Zendesk API
- Replies: 6
- Views: 1732
Re: Zendesk API
It should be:
HTTP.SetRequestHeader("Authorization", "Basic <superLongToken>")
or
HTTP.SetCredentials("<Username>", "<Password>", 0)
And..
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
- 26 Nov 2019, 23:33
- Forum: Ask for Help (v1)
- Topic: Help with Text Menu script Topic is solved
- Replies: 4
- Views: 968
Re: Help with Text Menu script Topic is solved
Code: Select all
::cur::
v = 1=a,"2=""ab"",cd",3=c
TextMenu(v)
return
- 26 Nov 2019, 10:34
- Forum: Ask for Help (v1)
- Topic: Help with Text Menu script Topic is solved
- Replies: 4
- Views: 968
Re: Help with Text Menu script Topic is solved
TextMenu(TextOptions) { arrVal := [] fn := Func("MenuAction").Bind( arrVal ) Loop, Parse, TextOptions, CSV { arr := StrSplit(A_LoopField, "=", " ") arrVal.push(arr[2]) Menu, MyMenu, Add, % arr[1], % fn } Menu, MyMenu, Show Menu, MyMenu, DeleteAll } MenuAction(arrVal) { SendInput % "{Text}" . arrVal...
- 24 Nov 2019, 00:37
- Forum: Ask for Help (v1)
- Topic: FileSelectFile - control the display view type
- Replies: 7
- Views: 1545
Re: FileSelectFile - control the display view type
You can use SelectFolderEx() by just me. SetTimer, ChangeDialog, -100 MsgBox, % SelectFolderEx() return ChangeDialog: WinWait, % "ahk_class #32770 ahk_pid " DllCall("GetCurrentProcessId") PostMessage, 0x111, 28751, 0, SHELLDLL_DefView1 ;View, Large icons return ; ====================================...
- 23 Nov 2019, 22:35
- Forum: Ask for Help (v1)
- Topic: AHK and API calls to Internet DOwnload Manager
- Replies: 7
- Views: 1662
Re: AHK and API calls to Internet DOwnload Manager
Thanks swagfag, SysAllocString function can fix the truncated issue :) CLSID_CIDMLinkTransmitter := "{AC746233-E9D3-49CD-862F-068F7B7CCCA4}" IID_ICIDMLinkTransmitter2 := "{94D09862-1875-4FC9-B434-91CF25C840A1}" tbl := ComObjCreate(CLSID_CIDMLinkTransmitter, IID_ICIDMLinkTransmitter2) bstrUrl := SysA...
- 22 Nov 2019, 02:47
- Forum: Ask for Help (v1)
- Topic: Get my ip-address outside the NAT-router Topic is solved
- Replies: 2
- Views: 621
Re: Get my ip-address outside the NAT-router Topic is solved
Just grab the ip address from one of the websites.
Code: Select all
MsgBox % GetIP()
GetIP() {
whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
whr.Open("GET", "https://api.ipify.org/")
whr.Send()
return whr.ResponseText
}
- 22 Nov 2019, 01:43
- Forum: Ask for Help (v1)
- Topic: Extract ZIP to RAM?
- Replies: 71
- Views: 10713
Re: Extract ZIP to RAM?
oh, I think that's the problem of my SevenZip_ExtractMem2. For now you can use SevenZipExtractMem (https://www.autohotkey.com/boards/viewtopic.php?p=298798#p298798), and make sure that the dlls you use have a SevenZipExtractMem function.
- 22 Nov 2019, 00:46
- Forum: Ask for Help (v1)
- Topic: AHK and API calls to Internet DOwnload Manager
- Replies: 7
- Views: 1662
Re: AHK and API calls to Internet DOwnload Manager
CLSID_CIDMLinkTransmitter := "{AC746233-E9D3-49CD-862F-068F7B7CCCA4}" IID_ICIDMLinkTransmitter2 := "{94D09862-1875-4FC9-B434-91CF25C840A1}" tbl := ComObjCreate(CLSID_CIDMLinkTransmitter, IID_ICIDMLinkTransmitter2) ; tbl.SendLinkToIDM DllCall(vtable(tbl,3), "ptr", tbl , "str", "https://example.com" ...
- 21 Nov 2019, 23:10
- Forum: Ask for Help (v1)
- Topic: Extract ZIP to RAM?
- Replies: 71
- Views: 10713
Re: Extract ZIP to RAM?
hasantr That shoudn't be happen, but I tested anyway. I created the folder D:\Folder\inFolder , and copied test.zip to both D:\Folder\ and D:\Folder\inFolder\ , the code just works fine. MsgBox % SevenZip_ExtractMem2("D:\Folder\test.zip", "test2.txt") MsgBox % SevenZip_ExtractMem2("D:\Folder\inFold...
- 18 Nov 2019, 11:32
- Forum: Ask for Help (v1)
- Topic: How can I get the data from txt file? Topic is solved
- Replies: 23
- Views: 4026
Re: How can I get the data from txt file? Topic is solved
LoadData_GroupA("G:\Download\") LoadData_GroupA(Folder) { objA := {} Loop, Files, % Folder . "\CA_T*.txt" { FileRead, data, %A_LoopFileFullPath% r := "s)\R\((?P<date>\d{2}/\d{2}/\d{2} \d{2}:\d{2}.\d{2})[^\r\n]+\R+" . "Check BTF13 (?P<num>\d+)" . ".*?\R+ (?P<temp>[\d.+-]+)" startPos := 1 while found...
- 18 Nov 2019, 01:47
- Forum: Ask for Help (v1)
- Topic: Show menu below the button
- Replies: 2
- Views: 504
Re: Show menu below the button
Use ControlGetPos instead of GuiControlGet , also you can't omit % for this command. gui, add, button, w75 h23 vMyButton gShow HWNDhBtn, Button gui, show, w300 h300 return Show: loop 3 Menu, MyMenu, Add, Menu%A_Index%, MenuHandler ControlGetPos, cX, cY, cW, cH,, ahk_id %hBtn% Menu, MyMenu, Show, % c...
- 18 Nov 2019, 00:23
- Forum: Ask for Help (v1)
- Topic: Wrapper (class/function) for REST with JSON:API
- Replies: 11
- Views: 2484
Re: Wrapper (class/function) for REST with JSON:API
Thanks Chunjee, I found that Coco's class version JSON.ahk doesn't have such problem. It's just a typo in Jxon.ahk:
%value% should be %val%. I've submitted a pull request.
Code: Select all
else if (val == "true" || val == "false")
val := %value% + 0
- 16 Nov 2019, 23:11
- Forum: Ask for Help (v1)
- Topic: Wrapper (class/function) for REST with JSON:API
- Replies: 11
- Views: 2484
Re: Wrapper (class/function) for REST with JSON:API
Because.. it is easier to type Jxon_Load, and I rarely need to check true value. Also teadrinker's JSON class requires IE9+.