Search found 1019 matches

by teadrinker
17 Nov 2019, 09:11
Forum: Ask For Help
Topic: AHK compiler: Extract icon from EXE file
Replies: 2
Views: 96

Re: AHK compiler: Extract icon from EXE file

john_c wrote: I don't want to extract icon manually.
But you could extact an icon programmatically. :)
by teadrinker
11 Nov 2019, 13:49
Forum: Ask For Help
Topic: How do you "click" the 5 number on the Windows 10 calculator
Replies: 26
Views: 1000

Re: How do you "click" the 5 number on the Windows 10 calculator

I know about that, but haven't tried yet.
by teadrinker
11 Nov 2019, 11:17
Forum: Ask For Help
Topic: How do you "click" the 5 number on the Windows 10 calculator
Replies: 26
Views: 1000

Re: How do you "click" the 5 number on the Windows 10 calculator

No, but some elements produce such errors for some reason, I didn't dig into this issue. Using try just prevents the script from stop working.
by teadrinker
11 Nov 2019, 10:42
Forum: Ask For Help
Topic: How do you "click" the 5 number on the Windows 10 calculator
Replies: 26
Views: 1000

Re: How do you "click" the 5 number on the Windows 10 calculator

You could try to change SearchElement() like this: SearchElement(parentElement, params) { found := true for k, v in params { try (parentElement["acc" . k](0) != v && found := false) catch found := false } until !found if found Return parentElement try Children := AccChildren(parentElement) for k, v ...
by teadrinker
10 Nov 2019, 10:52
Forum: Ask For Help
Topic: How do you "click" the 5 number on the Windows 10 calculator
Replies: 26
Views: 1000

Re: How do you "click" the 5 number on the Windows 10 calculator

Just tried to install, unfortunately without success, installing got stuck at 18.5%.
by teadrinker
10 Nov 2019, 09:32
Forum: Ask For Help
Topic: How do you "click" the 5 number on the Windows 10 calculator
Replies: 26
Views: 1000

Re: How do you "click" the 5 number on the Windows 10 calculator

Sorry, it's difficult to say anything without having Adobe XD installed.
by teadrinker
10 Nov 2019, 06:59
Forum: Ask For Help
Topic: How do you "click" the 5 number on the Windows 10 calculator
Replies: 26
Views: 1000

Re: How do you "click" the 5 number on the Windows 10 calculator

The approach which SearchCalc() function uses is only for windows with ahk_class ApplicationFrameWindow. In other cases you could get the window handle directly by hWnd := WinExist("window name"). And then accObj := AccObjectFromWindow(hWnd).
by teadrinker
10 Nov 2019, 05:46
Forum: Ask For Help
Topic: How do you "click" the 5 number on the Windows 10 calculator
Replies: 26
Views: 1000

Re: How do you "click" the 5 number on the Windows 10 calculator

TheBeginner wrote: I tried to for a few hours but couldn't make it work
What is the window you try to get an accessible object from? Please, show your code.
by teadrinker
09 Nov 2019, 21:11
Forum: Ask For Help
Topic: How do you "click" the 5 number on the Windows 10 calculator
Replies: 26
Views: 1000

Re: How do you "click" the 5 number on the Windows 10 calculator

I wouldn't use paths at all since they depend on calculator mode and could be changed after each update.
by teadrinker
09 Nov 2019, 19:58
Forum: Ask For Help
Topic: How do you "click" the 5 number on the Windows 10 calculator
Replies: 26
Views: 1000

Re: How do you "click" the 5 number on the Windows 10 calculator

For example the script below gets the name/value of an object underneath the mouse and works great in calculator, what I'm wondering is could I just use the name/value Try this: SetBatchLines, -1 name := "Пять" ; specify the button name you got by GetTextUnderMouse() hCalc := SearchCalc() if !hCalc...
by teadrinker
09 Nov 2019, 05:10
Forum: Ask For Help
Topic: Convert into standard variable
Replies: 5
Views: 245

Re: Convert into standard variable

Exactly!
by teadrinker
09 Nov 2019, 03:18
Forum: Ask For Help
Topic: Convert into standard variable
Replies: 5
Views: 245

Re: Convert into standard variable

Why don't you consider using := ? :crazy:
by teadrinker
09 Nov 2019, 02:05
Forum: Ask For Help
Topic: string version number comparison Topic is solved
Replies: 9
Views: 500

Re: string version number comparison Topic is solved

A minor fix:

Code: Select all

MsgBox, % pad("1.0") = pad("1.0.0")

pad(ver) {
   arr := StrSplit(ver, ".")
   Loop 4
      (arr[A_Index] = "" && arr[A_Index] := 0)
   Return Format("{:010}.{:010}.{:010}.{:010}", arr*)
}
by teadrinker
08 Nov 2019, 20:17
Forum: Ask For Help
Topic: string version number comparison Topic is solved
Replies: 9
Views: 500

Re: string version number comparison Topic is solved

guest3456 wrote: i just realized that there is no way for the function to know how many digits to pad
You could pad with an excess number of zeroes:

Code: Select all

MsgBox, % pad("1.1.31.9") < pad("1.1.31.0123")

pad(ver) {
   Loop, parse, ver, .
      str .= (str = "" ? "" : ".") . Format("{:010}", A_LoopField)
   Return str
}
by teadrinker
08 Nov 2019, 16:11
Forum: Ask For Help
Topic: string version number comparison Topic is solved
Replies: 9
Views: 500

Re: string version number comparison Topic is solved

@guest3456

Code: Select all

MsgBox, % pad("8.1") < pad("10")

pad(ver) {
   str := RegExReplace(ver, "(?<=\.)\d(?=\.|$)", "0$0")
   Return RegExReplace(str, "(?<!^\d)(?<!^\d\d)\.")
}
Like this?
by teadrinker
07 Nov 2019, 00:36
Forum: Ask For Help
Topic: iterate through json using for
Replies: 3
Views: 166

Re: iterate through json using for

There is one more possibility:

Code: Select all

for k, v in JSON.Enum(APIReult)
   MsgBox, % k ": " v

MsgBox, Next Example

for k, v in JSON.Enum(APIReult)
   for k, v in JSON.Enum(v)
      MsgBox, % k ": " v
by teadrinker
06 Nov 2019, 16:03
Forum: Ask For Help
Topic: Rewrite AddGraphicButton to accept PNG files Topic is solved
Replies: 3
Views: 237

Re: Rewrite AddGraphicButton to accept PNG files Topic is solved

Also the parameter IMAGE_BITMAP and IMAGE_ICON can be left out, does anybody knows what is their function is? Documents know: If this parameter is omitted or not a variable, the return value is always a bitmap handle (icons/cursors are converted if necessary). This is because reliably using or dele...
by teadrinker
06 Nov 2019, 08:02
Forum: Ask For Help
Topic: Rewrite AddGraphicButton to accept PNG files Topic is solved
Replies: 3
Views: 237

Re: Rewrite AddGraphicButton to accept PNG files Topic is solved

Try this: icoFile := "D:\Icons\icon.ico" pngFile := "D:\Icons\image.png" BS_ICON := 0x40 BS_BITMAP := 0x80 IMAGE_BITMAP := 0 IMAGE_ICON := 1 BM_SETIMAGE := 0xF7 Gui, Add, Button, w100 h30 %BS_ICON% hwndhIconButton Gui, Add, Button, x+5 yp wp hp %BS_BITMAP% hwndhImageButton if !hIcon := LoadPicture(i...
by teadrinker
02 Nov 2019, 11:34
Forum: Ask For Help
Topic: Why Excel Addins is Wrong?
Replies: 12
Views: 536

Re: Why Excel Addins is Wrong?

Code: Select all

objExcel := ComObjCreate("Excel.Application") 
objExcel.Application.Visible := True
objExcel.DisplayAlerts := False
objExcel.Workbooks.Add
Loop % objExcel.COMAddIns.Count
   MsgBox, % objExcel.COMAddIns.Item(A_Index).Description

Go to advanced search