Search found 41 matches
- 17 May 2024, 09:20
- Forum: Scripts and Functions (v2)
- Topic: Modal Dialog Box In AutoHotkey32 2.0.14 with Masm-32 bit
- Replies: 1
- Views: 221
Modal Dialog Box In AutoHotkey32 2.0.14 with Masm-32 bit
Using Microsoft Assembler and their disassembler makes it easy to import the opcodes into AHK. I cut the opcode and Mnemonics from their dissassembler and pasted into an array in AHK(see script). The Debug is needed at first to get offsets into the Masm, just paste into an empty file. Go here for Ma...
- 11 Jun 2023, 09:00
- Forum: Ask for Help (v2)
- Topic: How to get pointer to a string stored in an array element?
- Replies: 26
- Views: 2635
Re: How to get pointer to a string stored in an array element?
@just me
Try using a SafeArray, this might solve your strptr issue.
Try using a SafeArray, this might solve your strptr issue.
Code: Select all
;arr := ["Hello!","Olleh!"]
arr := ComObjArray(12,2)
arr[0] := "Hello!"
arr[1] := "Olleh!"
ptr1 := StrPtr(arr[0])
ptr2 := StrPtr(arr[1])
MsgBox ptr1 " " StrGet(ptr1) " " ptr2 " " StrGet(ptr2)
- 21 May 2023, 08:24
- Forum: Ask for Help (v2)
- Topic: Draw horizontal screen wide cross at cursor
- Replies: 2
- Views: 373
Re: Draw horizontal screen wide cross at cursor
locked21 Here is my take on what you want. It works on any window that is open. #SingleInstance CoordMode "Mouse" SetWinDelay 0 Cross_Hairs(cHairs){ win := Gui("-DPIScale -caption +AlwaysOnTop +E32") win.BackColor := "black" win.Show cHairs WinSetTransparent 255,win.hWnd Return win } MouseGetPos &x...
- 14 May 2023, 09:03
- Forum: Ask for Help (v2)
- Topic: How to get pointer to a string stored in an array element?
- Replies: 26
- Views: 2635
Re: How to get pointer to a string stored in an array element?
@just me
Looking @ your first example how about this:
Looking @ your first example how about this:
Code: Select all
Arr := [StrPtr("Hello!"),StrPtr("Olleh!")]
;Ptr1 := StrPtr(Arr[1])
;Ptr2 := StrPtr(Arr[2])
MsgBox Arr[1] " " StrGet(Arr[1])
- 24 Apr 2023, 08:53
- Forum: Scripts and Functions (v2)
- Topic: WebView2
- Replies: 139
- Views: 36321
Re: WebView2
@tqphan yes there is, but, using doc title change event thinking who changes title of their page, I never have so this seemed to be a good solution.
You can use Host and Host Objects so javascript can respond back to AHK, something like "chrome.webview.hostObjects.AHK.iClick(io)".
You can use Host and Host Objects so javascript can respond back to AHK, something like "chrome.webview.hostObjects.AHK.iClick(io)".
- 18 Apr 2023, 10:51
- Forum: Scripts and Functions (v2)
- Topic: RC6.DLL - Webview2 Com Dll And A Lot More
- Replies: 1
- Views: 890
RC6.DLL - Webview2 Com Dll And A Lot More
I found the RC6.DLL Here: https://vbrichclient.com/#/en/Downloads.htm Developed for 32 Bit Visual Basic 6 and works very well in AHK 32 bit 2.0.2. Version Dependent ProgID "RC6.cWebView2" For the most part the methods and properties are self explanitory. Have converted a couple of my 64 bit Webview2...
- 26 Feb 2023, 10:30
- Forum: Scripts and Functions (v2)
- Topic: WebView2
- Replies: 139
- Views: 36321
Re: WebView2
Tre4shunter, Here is my Neutron example, hope it might help. #Include lib\webview2.ahk DocumentTitleChangedEventHandler(){ iClick := wv.CoreWebView2.DocumentTitle Switch(iClick){ Case 1,2: MsgBox "Button " iClick " Clicked","NewTron","Iconi t2" } } On_Key(iName,iKey){ HostObj.iName := iName HostObj....
- 13 Jan 2023, 13:32
- Forum: Ask for Help (v2)
- Topic: OnEvent Confusion Version 2.0.2
- Replies: 2
- Views: 469
OnEvent Confusion Version 2.0.2
My confusion is Gui Close and Escape "OnEvent". With (GuiObject).OnEvent "Close",ExitApp I get an error message: Parameter #1 of ExitApp requires a Number, but received a Gui. 010: txt.SetFont("s22 cnavy bold","Times New Roman") 012: win.Show("w500 h200") 013: Exit ExitApp is a built-in function whi...
- 03 Dec 2022, 13:22
- Forum: Scripts and Functions (v2)
- Topic: WebView2
- Replies: 139
- Views: 36321
[V2-rc.2 WebView2 Window 10 64bit] Christmas Tree and Snow
Here is a simple WebView2 Xmas tree with some snow. Put the XmasImages.ahk in the Lib directory of WebView2. Take the 2 off of xMasTree2 and you will get a different Xmas Tree. #Include lib\webview2.ahk #Include lib\xmasimages.ahk NavStr := Format(" ( <script src="https://ajax.aspnetcdn.com/ajax/jQu...
- 19 Oct 2021, 09:10
- Forum: Ask for Help (v2)
- Topic: How to change the background colour of the StatusBar Topic is solved
- Replies: 4
- Views: 1168
Re: How to change the background colour of the StatusBar Topic is solved
Here, try this,it should give you some ideas to make changes to what you want to do with a StatusBar. Change the Icon to what you like. Ran on Win7 64 AHK v2beta2 Gui_Size(wParam,lParam,Msg,hWnd){ static SB_SETICON := 1039 static IMAGE_ICON := 1 static cwidth := 0 static cheight := 0 txt.Move (X+(cw...
- 02 Sep 2021, 08:27
- Forum: Scripts and Functions (v2)
- Topic: WebView2 Control For Edge
- Replies: 24
- Views: 10850
Re: WebView2 Control For Edge
Do not know why your getting a blank screen.
Copied both scripts from your post and changed the dllPath to what you changed.
Copied webview2loader to same dir.
It worked as expected, fading Google Logo.
Again, running on Win7 64 bit.
Thanks, for trying.
Copied both scripts from your post and changed the dllPath to what you changed.
Copied webview2loader to same dir.
It worked as expected, fading Google Logo.
Again, running on Win7 64 bit.
Thanks, for trying.
- 01 Sep 2021, 08:33
- Forum: Scripts and Functions (v1)
- Topic: .NET Framework Interop (CLR, C#, VB)
- Replies: 201
- Views: 119471
Re: .NET Framework Interop (CLR, C#, VB)
Fooling with CLR v2.0-beta.1 My C# code works just fine. Added this code to CLR AutoHotkey v2.0-beta.1 #include: CLR_CompileJS(Code, References:="", AppDomain:=0, FileName:="", CompilerOptions:="") { return CLR_CompileAssembly(Code, References, "System", "Microsoft.JScript.JScriptCodeProvider", AppD...
- 01 Sep 2021, 07:54
- Forum: Scripts and Functions (v2)
- Topic: WebView2 Control For Edge
- Replies: 24
- Views: 10850
Re: WebView2 Control For Edge
@tqphan
Please, show what code your executing.
Thanks
Please, show what code your executing.
Thanks
- 09 Aug 2021, 08:24
- Forum: Scripts and Functions (v2)
- Topic: WebView2 Control For Edge
- Replies: 24
- Views: 10850
Re: WebView2 Control For Edge
You can find WebView2Loader dll here https://www.nuget.org/packages/Microsoft.Web.WebView2/1.0.902-prerelease
- 06 Aug 2021, 09:12
- Forum: Scripts and Functions (v2)
- Topic: WebView2 Control For Edge
- Replies: 24
- Views: 10850
Re: WebView2 Control For Edge
Here is My Current WebView2 Include for Version 2.0-beta.1 ; Current WebView2 Include ; For Version 2.0-beta.1 On_ReSize(controller,*){ If(wvLeft+wvTop+wvRight+wvBottom>0) DllCall "SetRect","ptr",RECT,"int",wvLeft,"int",wvTop,"int",wvRight,"int",wvBottom Else DllCall "GetClientRect","ptr",AHKGui.hWn...
- 14 Jun 2021, 12:13
- Forum: Scripts and Functions (v2)
- Topic: [a136] Gui ONE LINERS With Dot Notation
- Replies: 0
- Views: 1087
[a136] Gui ONE LINERS With Dot Notation
I am Working on a class to make ONE LINE Guies with dot notation. Here is I_Gui Class, in the zip. Class I_Gui{ __New(p*){ this.win := Gui(p*) this.cntl := [] this.X := 0 this.Y := 0 } Margin(x:=0,y:=0){ this.win.MarginX := x this.win.MarginY := y return this } Left(inum){ this.X := inum return this...
- 17 May 2021, 08:56
- Forum: Scripts and Functions (v2)
- Topic: [2.0-a134] Run PowerShell Without PowerShell EXE!
- Replies: 0
- Views: 1381
[2.0-a134] Run PowerShell Without PowerShell EXE!
Found this on github https://gist.github.com/rhmoult/d77452ea70504fbb8635b4b2d17de6cb Follow the instruction steps, or use my "DLL" that make it much simpler to start playing. Changed the name from "Empire.COMPosh" an EXE to "psScript" a 64bit DLL. "psScript" only has 1 method called "PS_Script()". ...
- 01 May 2021, 11:41
- Forum: Ask for Help (v2)
- Topic: [2.0-a133] AHK VS Javascript Safearray (WebView2)
- Replies: 0
- Views: 430
[2.0-a133] AHK VS Javascript Safearray (WebView2)
Pass a safearray in AHK to JavaScript works as is. The safearray passed to Javascript: arr := ComObjArray(VT_VARIANT:=12,3) arr[0] := "AHK Date = " A_NOWUTC arr[1] := "AHK Version = " A_AHKVersion arr[2] := "OS Version = " A_OSVersion JavaScript display of AHK safearray like any array: arr[0] arr[1]...
- 15 Apr 2021, 08:19
- Forum: Scripts and Functions (v2)
- Topic: [AHK 2.0-a131] Passing Data WebView2
- Replies: 2
- Views: 1441
Re: [AHK 2.0-a131] Passing Data WebView2
Here it is.
- 14 Apr 2021, 11:52
- Forum: Scripts and Functions (v2)
- Topic: [AHK 2.0-a131] Passing Data WebView2
- Replies: 2
- Views: 1441
[AHK 2.0-a131] Passing Data WebView2
Using global variables HostName, and HostObj sets up the Object variant for AddHostObjectToScript. Passing a sting, integer, and float data to and from AHK WebView2. #include webview2.ahk Show_Data(){ msgbox Format("JS Date = {:s}`nJS Screen Width = {:d}`nJS PI = {:1.15f}",HostObj.str,HostObj.int,Ho...