Search found 382 matches

by afe
Today, 13:32
Forum: Ask For Help
Topic: Is there a way to terminate whr.WaitForResponse() immediately?
Replies: 1
Views: 34

Is there a way to terminate whr.WaitForResponse() immediately?

Hello,

If an http response time is more than ten seconds, but I can't set the timeout, such as WaitForResponse(10), if I want to cancel it, is there a way?

Thanks.
by afe
Today, 07:35
Forum: Ask For Help
Topic: RegEx lookbehind assertion question
Replies: 2
Views: 59

RegEx lookbehind assertion question

Hello,

In the look-behind assertionn, can't the condition be an option with a Non-fixed length?
For example, in the following example, I tried to match bc in abc,d with [^,]+. The expected result is d.

Code: Select all

abc,d

(?<=a[^,]+,)\w
Thanks.
by afe
16 Jun 2019, 04:39
Forum: Ask For Help
Topic: Is there a way to adjust the alignment of the DropDownList item?
Replies: 5
Views: 174

Re: Is there a way to adjust the alignment of the DropDownList item?

Thank you. This should be horizontal center alignment, not vertical center alignment, right?
by afe
15 Jun 2019, 10:18
Forum: Ask For Help
Topic: Is there a way to adjust the alignment of the DropDownList item?
Replies: 5
Views: 174

Is there a way to adjust the alignment of the DropDownList item?

Hello, Is there a way to adjust the alignment of the DropDownList item? For example, in the following example, is it possible to align the items text vertically in the center? Thanks. Gui, Add, DropDownList, w300 hwndDDL vColorChoice, Black|White|Red|Green|Blue PostMessage, 0x153, 0, 30,, ahk_id %DD...
by afe
15 Jun 2019, 01:26
Forum: Ask For Help
Topic: #IfWinActive does not support variables? Topic is solved
Replies: 6
Views: 144

Re: #IfWinActive does not support variables? Topic is solved

Thank you very much. It work fine.
by afe
15 Jun 2019, 01:04
Forum: Ask For Help
Topic: #IfWinActive does not support variables? Topic is solved
Replies: 6
Views: 144

Re: #IfWinActive does not support variables? Topic is solved

Edit:

Thank you very much. It work fine.

Code: Select all

Gui, Show, h300 w400, TEST
Process, Exist
pid := ErrorLevel
return

#If WinActive("TEST" "ahk_pid" . pid)
    Enter::MsgBox OK
return
by afe
15 Jun 2019, 00:43
Forum: Ask For Help
Topic: How to keep the scripts independent and not affecting each other? Topic is solved
Replies: 2
Views: 77

How to keep the scripts independent and not affecting each other? Topic is solved

Hello, When the same script is run again, how do the two processes of the script remain independent and do not affect each other? For example, in the example below, I found that when the script was run again, they interacted with each other and could not work as expected. #SingleInstance Off Gui, Sh...
by afe
15 Jun 2019, 00:22
Forum: Ask For Help
Topic: #IfWinActive does not support variables? Topic is solved
Replies: 6
Views: 144

#IfWinActive does not support variables? Topic is solved

Hello, I encountered a problem when the hotkey was only started when the script's own window was active. I found that #IfWinActive does not support %Var%. How to solve it? If the script is run again and no ahk_pid %pid% is added, does the hotkey conflict between the two processes? Thanks. #SingleIns...
by afe
14 Jun 2019, 00:39
Forum: Ask For Help
Topic: How to get which window of the current script is the default?
Replies: 0
Views: 51

How to get which window of the current script is the default?

Hello, How to get which window of the current script is the default? When I use Gui, +OwnDialogs , MsgBox is not owned with the current window. But when using Gui, 1:+OwnDialogs , it works fine. So I want to know if the current window Gui1 is the default. Thanks. Gui, Add, Button,, Open Gui, Show, h...
by afe
09 Jun 2019, 08:44
Forum: Ask For Help
Topic: How to bypass slide captcha?
Replies: 0
Views: 65

How to bypass slide captcha?

Hello, I encountered slide captcha when converting a registration page to AHK code. How to simulate slide captcha behavior with AHK code and bypass it? I got nothing by grabbing the packet. It should be through the JS code to calculate the mouse movement behavior. Thanks. Just like: https://www.jque...
by afe
07 Jun 2019, 06:28
Forum: Ask For Help
Topic: How to implement Zero FillRight Shift (>>>)? Topic is solved
Replies: 4
Views: 112

Re: How to implement Zero FillRight Shift (>>>)? Topic is solved

Great! Just need to perform & operation with 0xFFFFFFFF, why ?

Code: Select all

msgbox % ( -9 & 0xFFFFFFFF ) >> 2
by afe
06 Jun 2019, 12:30
Forum: Ask For Help
Topic: How do I make Bitwise-not (~) treat operands between 0 and 4294967295 (0xffffffff) as signed 32-bit frame integers? Topic is solved
Replies: 4
Views: 159

Re: How do I make Bitwise-not (~) treat operands between 0 and 4294967295 (0xffffffff) as signed 32-bit frame integers? Topic is solved

1) Just reinterpret the number as signed: bit_not_int(n){ return ~n << 32 >> 32 } 2) reinterpret the number as signed with numget/put: bit_not_int(n){ varsetcapacity(var, 4) numput(~n, var, "int") return numget(&var, "int") } 3) perform the ~ op in the upper 32 bits of a signed int64 and shift it d...
by afe
06 Jun 2019, 11:52
Forum: Ask For Help
Topic: How do I make Bitwise-not (~) treat operands between 0 and 4294967295 (0xffffffff) as signed 32-bit frame integers? Topic is solved
Replies: 4
Views: 159

Re: How do I make Bitwise-not (~) treat operands between 0 and 4294967295 (0xffffffff) as signed 32-bit frame integers? Topic is solved

I'm not sure it can be done with format: All integers and floating-point input values are 64-bit. (https://www.autohotkey.com/docs/commands/Format.htm#Remarks) I googled "32 bit signed" and found this: If the number was intended to be negative, convert it to a signed 32-bit integer by using OutputV...
by afe
05 Jun 2019, 08:47
Forum: Ask For Help
Topic: How do I make Bitwise-not (~) treat operands between 0 and 4294967295 (0xffffffff) as signed 32-bit frame integers? Topic is solved
Replies: 4
Views: 159

How do I make Bitwise-not (~) treat operands between 0 and 4294967295 (0xffffffff) as signed 32-bit frame integers? Topic is solved

Hello, I am having trouble translating JS code, that is, the JS ~ operator treats the operand as a signed 32-bit integer, but AHK treats the operand between 0 and 4294967295 (0xffffffff) as unsigned 32 Bit integer. How to implement the function of JS's ~ operator with AHK? Can I use Format() to conv...
by afe
03 Jun 2019, 01:59
Forum: Ask For Help
Topic: How to display ResponseText in UTF-8 format? Topic is solved
Replies: 5
Views: 234

Re: How to display ResponseText in UTF-8 format? Topic is solved

Wonderful!

Why to add 8 here?

Code: Select all

NumGet(ComObjValue(arr) + 8 + A_PtrSize)
Thank you very much!

Go to advanced search