Search found 38 matches

by phaleth
22 Feb 2021, 15:03
Forum: Ask for Help (v2)
Topic: Detect keyboard layout code needs fix for v2-a124 Topic is solved
Replies: 3
Views: 801

Re: Detect keyboard layout code needs fix for v2-a124 Topic is solved

After giving the problem a closer look I was able to fix the code for v2-a124. MsgBox(checkWindowKBD()) checkWindowKBD() { threadID := GetFocusedThread(hwnd := WinExist("A")) hkl := DllCall("user32\GetKeyboardLayout", "UInt", threadID) ; 0 for current thread ; hkl: 1=next, 0=previous | flags: 0x100...
by phaleth
22 Feb 2021, 02:22
Forum: Ask for Help (v2)
Topic: Detect keyboard layout code needs fix for v2-a124 Topic is solved
Replies: 3
Views: 801

Re: Detect keyboard layout code needs fix for v2-a124 Topic is solved

swagfag wrote:
21 Feb 2021, 12:13
u need to stop using VatSetXXX and replace them with BufferAlloc.
NumPut calls need to obey the proper signature
Could you please provide more details? I don't follow any of that.
by phaleth
21 Feb 2021, 11:33
Forum: Ask for Help (v2)
Topic: Detect keyboard layout code needs fix for v2-a124 Topic is solved
Replies: 3
Views: 801

Detect keyboard layout code needs fix for v2-a124 Topic is solved

Bellow is a code for keyboard layout detection. The code works perfectly fine on ahk v2-a110. On ahk v2-a124 there is something wrong with the NumPut() function call and the interpreter displays an error. Any idea how to fix the code? I've noticed the docs for NumPut() have changed, but in a way tha...
by phaleth
01 Dec 2019, 05:29
Forum: SciTE4AutoHotkey
Topic: SciTE4AHK dark theme - ahkbin style
Replies: 3
Views: 7711

Re: SciTE4AHK dark theme - ahkbin style

genaro, I'm not sure. Originally when i posted these configs the only thought I had was this should be shared with the community. Maybe somebody with deeper knowledge of SciTE4AHK could give some insights as to where are these configs supposed to go. When you posted the reply I've contacted BirdFluA...
by phaleth
28 May 2019, 09:09
Forum: Ask for Help (v1)
Topic: SAP through COM?
Replies: 15
Views: 5332

Re: SAP through COM?

Great, I imagine the MsgBox in the code i posted above spoiled it for you.

MsgBoxes is what you might wanna avoid when dealing with references to apps external to ahk.
by phaleth
27 May 2019, 13:07
Forum: Ask for Help (v1)
Topic: SAP through COM?
Replies: 15
Views: 5332

Re: SAP through COM?

Yep, the assignment operator i used is wrong for sure.

Hard to do any coding at all without being able to test. I should try fixing my post.

Btw, the dollar signs in front of vars might still work for ahk, that wasn't the issue anyway.
by phaleth
27 May 2019, 10:57
Forum: Ask for Help (v1)
Topic: SAP through COM?
Replies: 15
Views: 5332

Re: SAP through COM?

That's a code from AutoIt. Try something like the following while on the SAP Easy Access screen: ;>>>>>>>>Session attachment>>>>>>>>>>>>>>>>>>>>>>>>>>>> sapGui = ComObjGet("SAPGUI") MsgBox, 0, debugging, % isObject(sapGuiAuto) ; this should display 1 application = sapGui.GetScriptingEngine connectio...
by phaleth
28 Jul 2018, 12:50
Forum: SciTE4AutoHotkey
Topic: SciTE4AHK dark theme - ahkbin style
Replies: 3
Views: 7711

SciTE4AHK dark theme - ahkbin style

Credits: BirdFluAway https://i.imgur.com/Okk4rXq.png # User initialization file for SciTE4AutoHotkey # # You are encouraged to edit this file! # # Import the platform-specific settings import _platform # Import the settings that can be edited by the bundled properties editor import _config # Add her...
by phaleth
07 Dec 2017, 11:11
Forum: Ask for Help (v1)
Topic: Need help with having parts of my script happen "simultaneously"
Replies: 7
Views: 1545

Re: Need help with having parts of my script happen "simultaneously"

I'm sorry. Should just tell me to read the forum post as that was what you pasted into IRC.

Don't let that throw you off.
by phaleth
07 Dec 2017, 09:26
Forum: Ask for Help (v1)
Topic: Need help with having parts of my script happen "simultaneously"
Replies: 7
Views: 1545

Re: Need help with having parts of my script happen "simultaneously"

Try running this code standalone

Code: Select all

#NoEnv
SetKeyDelay, -1, 110

$XButton1::
KeyWait, XButton1, T0.20
If ErrorLevel = 0
{
	Click X1
	Sleep 100
}
Else
{
	While GetKeyState("XButton1","P")
	{
		Send a
		If GetKeyState("XButton2","P")
		{
      			Send d
		}
	}
}
Return
by phaleth
12 Aug 2017, 13:25
Forum: Scripts and Functions (v1)
Topic: [Editor] CodeQuickTester - Write and run code without saving to a temporary file
Replies: 204
Views: 117027

Re: CodeQuickTester - Write and run code without touching the file system

For the font I'd go with 'Droid Sans Mono, 11pt' as shown on the picture bellow, or if that's not available then 'DejaVu Sans Mono, 11pt'

Image
by phaleth
09 Jul 2017, 03:08
Forum: Ask for Help (v1)
Topic: Internet Explorer: activate tab Topic is solved
Replies: 3
Views: 5368

Re: Internet Explorer: activate tab Topic is solved

Following is prolly not 100% reliable but still way better than using ControlSend SetTitleMatchMode, 2 ;MsgBox, 0, Current, % IEGet().LocationUrl targetURL := "https://autohotkey.com/" wb := IEGet() For wb in ComObjCreate( "Shell.Application" ).Windows { If InStr( wb.LocationURL, targetURL ) && InSt...
by phaleth
22 Jun 2017, 13:29
Forum: Ask for Help (v1)
Topic: Wait for function to finish before going to second
Replies: 11
Views: 7446

Re: Wait for function to finish before going to second

SetTimer within a function definition doesn't work the same way as outside of the function, cause again once the function gets to a Return line it just terminates, and so does the SetTimer contained within it.

Inside of a function use loop instead of SetTimer.
by phaleth
22 Jun 2017, 11:49
Forum: Ask for Help (v1)
Topic: Wait for function to finish before going to second
Replies: 11
Views: 7446

Re: Wait for function to finish before going to second

Return used inside a function once reached terminates the function. Nothing bellow the Return line will ever get executed. Functions are running one after another, your functions just don't ever finish as whole.
by phaleth
02 Jun 2017, 14:31
Forum: Ask for Help (v1)
Topic: Using RegExReplace() to match characters but not to replace/remove all matched characters
Replies: 2
Views: 992

Re: Using RegExReplace() to match characters but not to replace/remove all matched characters

Code: Select all

Newclip = REPLACED MB & LCD BACK COVER,DMI, UPDATED BIOS.

Newclip := RegExReplace(Newclip, ",\s?", ", ")

MsgBox, % Newclip
by phaleth
08 May 2017, 03:34
Forum: Ask for Help (v1)
Topic: Ifwinexist - It's opening a new window all the time
Replies: 7
Views: 1838

Re: Ifwinexist - It's opening a new window all the time

hi,

Join the #ahk irc channel and ask for help there. I might be able to help you.

https://autohotkey.com/board/topic/2585 ... add-water/
by phaleth
09 Jan 2017, 12:47
Forum: Ask for Help (v1)
Topic: SAP through COM?
Replies: 15
Views: 5332

Re: SAP through COM?

any luck? zebuddha
by phaleth
02 Jan 2017, 11:13
Forum: Ask for Help (v1)
Topic: Internet Explorer: get WB hWnds via object loop (+ do win objects have unique object IDs)
Replies: 14
Views: 6919

Re: Internet Explorer: get WB hWnds via object loop (+ do win objects have unique object IDs)

Yeah, it's possible to retrieve the run time.

Code: Select all

startTime := A_TickCount
Sleep, 1000
MsgBox, 0, Run time, % endTime := A_TickCount - startTime
by phaleth
01 Jan 2017, 16:13
Forum: Ask for Help (v1)
Topic: Internet Explorer: get WB hWnds via object loop (+ do win objects have unique object IDs)
Replies: 14
Views: 6919

Re: Internet Explorer: get WB hWnds via object loop (+ do win objects have unique object IDs)

By milliseconds maybe. Use A_TickCount variable to find out the difference in runtime.

I don't think digging any deeper into this is worth the while, but maybe you will hit onto something else if you try.
https://msdn.microsoft.com/cs-cz/librar ... 85%29.aspx
by phaleth
01 Jan 2017, 11:14
Forum: Ask for Help (v1)
Topic: Internet Explorer: get WB hWnds via object loop (+ do win objects have unique object IDs)
Replies: 14
Views: 6919

Re: Internet Explorer: get WB hWnds via object loop (+ do win objects have unique object IDs)

The following code will say "they match" only when a single IE window with single IE tab is opened. On the comparison it only deals with the last out entries from each loop and so this code needs more work. Right now it's just good enough to give you the idea of what to compare to get pretty decent ...

Go to advanced search