Search found 15 matches

by birbird
14 Oct 2015, 00:42
Forum: Ask for Help (v1)
Topic: Convert Byte Array to String
Replies: 5
Views: 4121

Re: Convert Byte Array to String

have you tried StrPut()? http://ahkscript.org/docs/commands/StrPutGet.htm Thanks, friend I have tried StrGet() on your guide ... httpRequest.Send() httpRequest.WaitForResponse() ; result := httpRequest.ResponseText body := httpRequest.ResponseBody result := StrGet(&body, "UTF-8") MsgBox % result Bu...
by birbird
13 Oct 2015, 23:49
Forum: Ask for Help (v1)
Topic: Convert Byte Array to String
Replies: 5
Views: 4121

Convert Byte Array to String

Hi All, Is there any counterpart to AutoIt's BinaryToString in AutoHotKey? https://www.autoitscript.com/autoit3/docs/functions/BinaryToString.htm I need to convert WinHttpRequest's responseBody to utf-8 String, as the responseText seems to use the default code page which is not utf-8. Any help will ...
by birbird
23 Sep 2015, 11:14
Forum: Ask for Help (v1)
Topic: Seng message to another script
Replies: 5
Views: 4710

Re: Seng message to another script

For the later comers, I think for simple communication (Strings) across multiple scripts, WM_COPYDATA is quite a good choice, here is a working example from official document. ; Example: Send a string of any length from one script to another. This is a working example. ; To use it, save and run both...
by birbird
23 Sep 2015, 11:10
Forum: Ask for Help (v1)
Topic: Seng message to another script
Replies: 5
Views: 4710

Re: Seng message to another script

That's great, Coco
by birbird
22 Sep 2015, 21:02
Forum: Ask for Help (v1)
Topic: Seng message to another script
Replies: 5
Views: 4710

Re: Seng message to another script

Thanks a lot, dmg
by birbird
22 Sep 2015, 11:24
Forum: Ask for Help (v1)
Topic: Seng message to another script
Replies: 5
Views: 4710

Seng message to another script

Hi The scenario is: I have 2 scrpits, one is master.ahk, the other is slave.ahk. slave.ahk starts a program(window) then hold, waiting message from master.ahk to do different job to the opened window. master.ahk have its own logic to decide when to send what message. I think OnMessage and Post/SendM...
by birbird
08 Sep 2015, 04:25
Forum: Ask for Help (v1)
Topic: Use output.code.page with AutoHotKey cmd
Replies: 0
Views: 740

Use output.code.page with AutoHotKey cmd

SciTE4AutoHotKey has a config output.code.page to set the output encoding. I need this feature with command line.
Is there any AutoHotKey.exe parameter to set output.code.page? How does SciTE4AutoHotKey achieve this?
Could anyone tell please, any help will be highly appreciated.
by birbird
03 Jul 2015, 09:30
Forum: Ask for Help (v1)
Topic: Detect Control Text Change
Replies: 1
Views: 1315

Detect Control Text Change

How to detect the text of a control changed? My scenario is 1. Input some text in an EditBox 2. The programm gets some data from internet and show them in the window 3. I get the data by ControlGetText My current solution is sleep for some time then get the text, but it is unreliable. Is there any w...
by birbird
03 Jul 2015, 09:21
Forum: Ask for Help (v1)
Topic: Select Item of TreeView
Replies: 4
Views: 2908

Re: Select Item of TreeView

hd0202 wrote:Have a look at the doc
http://ahkscript.org/docs/commands/TreeView.htm#bifGet

Hubert
Thank you for your help.
But does it only work for own created GUI?
I want to automate the TreeView in another programm.
by birbird
03 Jul 2015, 09:00
Forum: Ask for Help (v1)
Topic: Select Item of TreeView
Replies: 4
Views: 2908

Select Item of TreeView

I don't find any TreeView related thing in Control cmd.
I need something like AutoIt's ControlTreeView

Code: Select all

ControlTreeView($hGUI, "", $hTreeView_1, "Select", "Root|Item 4")
Could anyone please tell how to automate a TreeView in AutoHotKey?
Any help will be highly appreciated!
by birbird
02 Jul 2015, 03:11
Forum: 请求帮助
Topic: code.page 设成 65001 以后,反而不认汉字了
Replies: 1
Views: 2171

code.page 设成 65001 以后,反而不认汉字了

默认设置是 code.page=0
运行下面程序,一切正常

Code: Select all

Run calc.exe, , , NewPID
WinWait, 计算器
WinGetText, text  ; The window found above will be used.
MsgBox, The text is:`n%text%
改变设置为 code.page=65001
反而找不到窗口了,卡在第二行

这是咋回事呢?
by birbird
02 Jul 2015, 03:00
Forum: Ask for Help (v1)
Topic: [Resolved] Print to Console
Replies: 7
Views: 23872

Re: Print to Console

maestrith wrote:Ah, sorry. When I read your original post you had mentioned "debug" so I assumed that you meant you were debugging....I suppose we all know what happens when we assume.
It is so kind of you. Thank you so much.
by birbird
02 Jul 2015, 02:58
Forum: Ask for Help (v1)
Topic: [Resolved] Print to Console
Replies: 7
Views: 23872

Re: Print to Console

If you write to stdout (when running the script via SciTE), it will appear in SciTE's output pane: ; Method 1 FileAppend line 1`n, * ; Method 2 stdout := FileOpen("*", "w") stdout.WriteLine("line 2") stdout.WriteLine("line 3") maestrith: Only if you are debugging (not just running) the script. Than...
by birbird
02 Jul 2015, 02:55
Forum: Ask for Help (v1)
Topic: [Resolved] Print to Console
Replies: 7
Views: 23872

Re: Print to Console

I could be wrong but I think if you put OutputDebug,[your text here] it will display in the debugger Thanks for your reply. It helps. But it can only work under debug mode, printing message in a stream viewer window. When I say debug, I mean finding problem of the programm. Just like AutoIt, many o...
by birbird
02 Jul 2015, 02:34
Forum: Ask for Help (v1)
Topic: [Resolved] Print to Console
Replies: 7
Views: 23872

[Resolved] Print to Console

I am new to AutoHotKey.
I use SciTE4AutoHotKey, need print some log when debugging.
Is there something like ConsoleWrite of AutoIt in AutoHotKey?

Any help will be highly appreciated! :D

Go to advanced search