Search found 34 matches

by neovis
28 Mar 2023, 23:02
Forum: Scripts and Functions (v1)
Topic: [Library] Chart using Gdiplus
Replies: 22
Views: 5363

Re: [Library] Chart using Gdiplus

Nice Job! Thank you so much! Is it possible to add text or numbers in the bars? pic.png This is example for you. #Include <chart/chart> #include <chart/gdip_all> OnExit(Func("Gdip_Shutdown").bind(Gdip_Startup())) Gui Add, Pic, xm w600 h300 0xE Hwndhwnd chart := chart(hwnd, "Bar").theme("dark") char...
by neovis
21 Sep 2022, 05:32
Forum: Scripts and Functions (v1)
Topic: ChromeRemoteObject for Chrome.ahk
Replies: 0
Views: 429

ChromeRemoteObject for Chrome.ahk

Source on Github Depends on Chrome.ahk by geek. The eval method is automatically added, and if a js object is returned, it is returned as an native AutoHotkey object. Example: browser := new Chrome(a_scriptDir "\ChromeProfile") page := browser.getPage() doc := page.eval("document") doc.querySelecto...
by neovis
21 Sep 2022, 02:47
Forum: Ask for Help (v1)
Topic: help with create ListView + LvAdd Button Topic is solved
Replies: 5
Views: 728

Re: help with create ListView + LvAdd Button Topic is solved

Here is a simple example. https://www.autohotkey.com/docs/commands/GuiControls.htm#DropDownList https://www.autohotkey.com/docs/commands/GuiControls.htm#Radio Gui Add, DDL, vddl, Apple||Line|Orange Gui Add, Radio, Checked vradio, A Gui Add, Radio, x+m, B Gui Add, Radio, x+m, C Gui Add, Button, xm w8...
by neovis
20 Sep 2022, 11:15
Forum: Scripts and Functions (v1)
Topic: [Library] Chrome.ahk - Automate Google Chrome using native AutoHotkey. No IE!
Replies: 668
Views: 463113

Re: [Library] Chrome.ahk - Automate Google Chrome using native AutoHotkey. No Selenium!

Hello, I recently started using it. This is very useful. However, using the JavaScript object is very difficult, so I added code to wrap the RemoteObject and use it as a native object. ChromeRemoteObject class automatically adds an eval method to Chrome.Page.eval . Source on Github: https://github.c...
by neovis
22 Jul 2022, 20:12
Forum: Ask for Help (v1)
Topic: how can i make a gui only movable/drag with mouse at y axis? Topic is solved
Replies: 4
Views: 765

Re: how can i make a gui only movable/drag with mouse at y axis? Topic is solved

teadrinker wrote:
22 Jul 2022, 19:58
@neovis
Good idea, but WM_SIZING is not 0x216. :)
Thank you for telling me. WM_SIZING is wrong. :o

It should be rename to:

Code: Select all

WM_MOVING 0x216
by neovis
22 Jul 2022, 20:02
Forum: Ask for Help (v1)
Topic: Function-Call Expression Never Evalutes to False Despite Function Returning False, Why? Topic is solved
Replies: 2
Views: 525

Re: Function-Call Expression Never Evalutes to False Despite Function Returning False, Why? Topic is solved

I added return and res variable ; Function for Displaying a GUI With Up to 10 Entries to Obtain User's Input(s) ; NOTE: Need to use ByRef Parameters to Return Multiple Values to the Caller. ; More Details Here: https://t.ly/nYak funcUserInput(varTitle, varLabel1="N/A", ByRef varInput1="N/A", varLabe...
by neovis
22 Jul 2022, 19:54
Forum: Ask for Help (v1)
Topic: If i want to use 2 variable to calculation, How to write the correct code???? Topic is solved
Replies: 6
Views: 1206

Re: If i want to use 2 variable to calculation, How to write the correct code???? Topic is solved

It seems to contain non-numeric characters. Try to remove white spaces.

Code: Select all

v1 := " 74 "
v2 := " 80 "

; strip white spaces
v1 := Trim(v1, " `t`r`n") 
v2 := Trim(v2, " `t`r`n")

x1 := v1-v2
MsgBox % x1
or

Code: Select all

v1 := RegExReplace(v1, "\D")
v2 := RegExReplace(v2, "\D")
by neovis
22 Jul 2022, 12:57
Forum: Ask for Help (v1)
Topic: progress RANGE not working Topic is solved
Replies: 7
Views: 923

Re: progress RANGE not working Topic is solved

RangeN-N is a options https://www.autohotkey.com/docs/commands/GuiControl.htm#options GuiControl +Range0-%myvar%, Progbar Calculation should be an expression https://www.autohotkey.com/docs/Language.htm#expressions-vs-legacy-syntax GuiControl,, Progbar, % myvar/2 GuiControl,, Progbar, % myvar*9/10
by neovis
21 Jul 2022, 14:20
Forum: Ask for Help (v1)
Topic: how can i make a gui only movable/drag with mouse at y axis? Topic is solved
Replies: 4
Views: 765

Re: how can i make a gui only movable/drag with mouse at y axis? Topic is solved

Try: OnMessage(0x216, "WM_SIZING") WM_SIZING(wparam, lparam, msg, hwnd) { global if (hwnd == hgui) { NumPut(left, lparam+0, "int") NumPut(right, lparam+8, "int") return true } } Gui +Hwndhgui Gui Show, w400 h200 WinGetPos left,, width,, % "ahk_id" hgui right := left+width
by neovis
21 Jul 2022, 14:11
Forum: Ask for Help (v1)
Topic: How to get AHK to wait a few seconds then click mouse button?
Replies: 1
Views: 234

Re: How to get AHK to wait a few seconds then click mouse button?

Code: Select all

~LButton::SetTimer Click, -3000

Click:
MouseClick Left
return
by neovis
18 Jul 2022, 01:40
Forum: Ask for Help (v1)
Topic: Vertical MouseMove to Wheel? Topic is solved
Replies: 2
Views: 567

Re: Vertical MouseMove to Wheel? Topic is solved

Its useful idea to me. I made it in a simple way. I think it would be better if apply acceleration. !MButton:: current := 0 MouseGetPos,, y1 while (GetKeyState("MButton", "P")) { MouseGetPos,, y2 offset := (y2-y1)//10 ; set scroll per pixel if (current != offset) { count := offset-current loop % Abs...
by neovis
15 Jul 2022, 13:03
Forum: Ask for Help (v1)
Topic: I created a phone book but the close option does not appear
Replies: 9
Views: 1411

Re: I created a phone book but the close option does not appear

Add the calculation below to scale according to dpiscale.

Code: Select all

Width := Width*a_screenDPI/96
H := (PY+PH)*a_screenDPI/96
by neovis
14 Jul 2022, 00:44
Forum: Ask for Help (v1)
Topic: detecting hwnd of combobox dropdown in AHK GUI
Replies: 5
Views: 1090

Re: detecting hwnd of combobox dropdown in AHK GUI

I don't know how to get combobox hwnd from sub list hwnd. But I found GetComboBoxInfo function. This is can get list hwnd from combobox hwnd. Maybe this is help you? Gui, New, AlwaysOnTop hwndMainGUI, test Gui, Add, ComboBox, x5 y20 w100 r4 hwndUserComboCtrl, A|B|C|D Gui, Add, Button, x10 y70 w100 h...
by neovis
14 Jul 2022, 00:37
Forum: Ask for Help (v1)
Topic: Cannot click on a tbody (Full Calendar) with chrome.ahk
Replies: 6
Views: 1556

Re: Cannot click on a tbody (Full Calendar) with chrome.ahk

Using CSS Selector

Code: Select all

found := page.evaluate("document.querySelector('td.fc-day-future.date-availiable') ? 1 : 0").value
MsgBox % "found: " found

if (found)
    page.evaluate("document.querySelector('td.fc-day-future.date-availiable').click()")
by neovis
12 Jul 2022, 10:40
Forum: Ask for Help (v1)
Topic: Detecting double-click on ListView's column header
Replies: 1
Views: 322

Re: Detecting double-click on ListView's column header

As far as I know, it is not supported in basic commands. This is using OnMessage . OnMessage(0x203, "WM_LBUTTONDBLCLK") WM_LBUTTONDBLCLK(wparam, lparam, msg, hwnd) { WinGetClass class, % "ahk_id" hwnd if (class == "SysHeader32") { hwnd := DllCall("GetParent", "ptr",hwnd, "ptr") ; hListView from hHea...
by neovis
12 Jul 2022, 09:53
Forum: Ask for Help (v1)
Topic: Using class instances as Function Objects Topic is solved
Replies: 6
Views: 754

Re: Using class instances as Function Objects Topic is solved

class CInputButton{ activate() { this.onButtonPressed.Call() HotKey, Joy1, % this.onButtonPressed ; HotKey, % this.inputString, % this.onButtonPressed active := true } } The activate method does manage to call the Function Object. But the HotKey still fails. In ahk again, Hotkey command only suppor...
by neovis
11 Jul 2022, 21:33
Forum: Ask for Help (v1)
Topic: Using class instances as Function Objects Topic is solved
Replies: 6
Views: 754

Re: Using class instances as Function Objects Topic is solved

onButtonPressed := ObjBindMethod( this , "Call" ) MsgBox % IsFunc( onButtonPressed ) and the message says 0. And indeed the consequent HotKey fails. In ahk, Bound function cannot be checked with the IsFunc function. Try use this function: IsBoundFunc(func) { static p := NumGet(&Func("Func").bind(""...
by neovis
11 Jul 2022, 11:12
Forum: Ask for Help (v1)
Topic: Using class instances as Function Objects Topic is solved
Replies: 6
Views: 754

Re: Using class instances as Function Objects Topic is solved

ObjBindMethod

Code: Select all

this.inputButton := New CInputButton(inputString, ObjBindMethod(this, "Call"))
'onButtonPressed' as an expression.

Code: Select all

Hotkey % inputString, % onButtonPressed
by neovis
11 Jul 2022, 11:08
Forum: Ask for Help (v1)
Topic: Cannot click on a tbody (Full Calendar) with chrome.ahk
Replies: 6
Views: 1556

Re: Cannot click on a tbody (Full Calendar) with chrome.ahk

The 'page' variable is not referenced. It must be passed as a parameter or referenced as a global variable.

Go to advanced search