Page 3 of 4
Re: AutoWin UserLibrary
Posted: Mon Jan 30, 2012 12:19 am
by Little John
ts-soft wrote:Thx for bugreport. Download the fixed version in first post!
Thanks.
ts-soft wrote:PS: AW_FindWindow is not a public function

I had a program that called the following public procedures:
Code: Select all
AW_ChangeMatchMode(#AW_MatchParaIsHwnd)
AW_WinWaitClose(Str(hWnd))
The program never ended, because AW_WinWaitClose() never ended, even when the respective window was closed. The cause of the problem was the bug in AW_FindWindow(), which is called by AW_WinWaitClose().
I only called AW_FindWindow() directly in my example code here in order to clearly demonstrate the bug.
Regards, LJ
Re: AutoWin UserLibrary
Posted: Thu Jan 29, 2015 3:13 pm
by nicolaus
Is there a version of this lib for actual PB version?
If i use the lib with PB 5.31 i receive many error message and i can't compile the code. what includes Au3Wrap.pbi.
Thanks,
Nico
Re: AutoWin UserLibrary
Posted: Thu Jan 29, 2015 6:22 pm
by ts-soft
The code compiles fine with 5.31, as include. I can't find any error.
To compile as tailbites userlib (not recommend), you have to use a compatible
version of tailbite.
There is no Au3Wrap.pbi in download, have you the right package?
Re: AutoWin UserLibrary
Posted: Sat Apr 18, 2015 11:15 am
by ly47
ts-soft wrote:The code compiles fine with 5.31, as include. I can't find any error.
Hi
I have copied AutoWin (Version 1.4.1) lib to C:\PureBasic\PureLibraries\UserLibraries
I tried to compile and get this error: "Library missing: Misc (needed by 'AutoWin' library)."
please help
thanks
ly
Code: Select all
EnableExplicit
Define.s Title
RunProgram("notepad")
Select GetUserDefaultLCID_()
Case 1031; german
Title = "Unbenannt"
Default
Title = "Untitled"
EndSelect
If AW_WinWait(Title, 10)
AW_WinActivate(Title)
AW_SendKeys("Feel the ..Pure.. Power{ENTER}{ENTER}of PureBasic.")
Delay(3000)
AW_WinActivate(Title)
AW_SendKeys("{ALTDOWN}{F4}{ALTUP}")
Delay(3000)
If AW_WinExists(Title)
AW_WinKill(Title)
EndIf
EndIf
/code]
Re: AutoWin UserLibrary
Posted: Sat Apr 18, 2015 12:02 pm
by Little John
Your code does not contain
(X)IncludeFile for including the AutoWin library.
ts-soft wrote:To compile as tailbites userlib (not recommend), you have to use a compatible
version of tailbite.
( And improving the readability by putting the code in
proper [ code ] tags will help others to help you. )
Re: AutoWin UserLibrary
Posted: Sat Apr 18, 2015 1:36 pm
by IdeasVacuum
Well, the error message says it can't find the Misc lib, which suggests that the AutoWin lib includes a procedure found in Misc?
Is that an issue caused by using TailBite? I seem to recall that from way back when.
ly47, if you are using TailBite, try an XIncludeFile of AutoWin_Include.pbi instead.
Re: AutoWin UserLibrary
Posted: Sat Apr 18, 2015 5:18 pm
by ly47
IdeasVacuum wrote:Well, the error message says it can't find the Misc lib, which suggests that the AutoWin lib includes a procedure found in Misc?
Is that an issue caused by using TailBite? I seem to recall that from way back when.
ly47, if you are using TailBite, try an XIncludeFile of AutoWin_Include.pbi instead.
Hi IdeasVacuum
Thanks
I have delete AutoWin (Version 1.4.1) lib (from C:\PureBasic\PureLibraries\UserLibraries), and used XIncludeFile of AutoWin_Include.pbi instead, and it works.
But not all procedures are working.
(ie: AW_WinMove, AW_WinActivate, AW_WinWait)
I have modified the code so only SendKeys works.
Thanks
ly
Code: Select all
Define.s Title, myTitle
Define.i dly = 1111
RunProgram("notepad")
Define.i lcid
; lcid = GetUserDefaultLCID_()
; Debug Str(lcid)
Select GetUserDefaultLCID_()
Case 1031; german
Title = "Unbenannt"
Default
Title = "Untitled - Notepad"
EndSelect
; If AW_WinWait(Title,10)
; AW_WinActivate(Title)
; myTitle = AW_WinGetTitle2(Title)
; Debug myTitle
Delay(dly)
; AW_WinMove(Title, 10, 10)
Delay(dly)
AW_SendKeys("Feel the ..Pure.. Power{ENTER}{ENTER}of PureBasic.")
Delay(dly)
; AW_WinActivate(Title)
; Delay(dly)
AW_SendKeys("{ALTDOWN}{F4}{ALTUP}")
Delay(dly)
AW_SendKeys("{TAB}")
Delay(dly)
AW_SendKeys("{ENTER}")
; If AW_WinExists(Title)
; AW_WinKill(Title)
; EndIf
; EndIf
Re: AutoWin UserLibrary
Posted: Tue Apr 21, 2015 6:27 am
by JCV
Thanks for this nice library ts-soft
I modified the AW_ControlClick to support custom coordinates like
Autoit ControlClick
Code: Select all
Macro AW_ControlClick(title, controlID, Button = #PB_Button_Left, clicks = 1, x = -1, y = -1)
AW_ControlClick3(title, controlID, Button, clicks, x, y)
EndMacro
Macro MAKELPARAM(x, y)
(y<<16) | x
EndMacro
ProcedureDLL AW_ControlClick3(title.s, controlID.s, Button, clicks, x, y)
Protected i
Protected *param.AW_WinParameter
*param = AW_FindWindow(title)
If *param\hWnd
*param = AW_FindControl(*param\hWnd, controlID.s)
If *param\hWnd
Select Button
Case #PB_Button_Left
For i = 1 To clicks
If x > -1 And y > -1
PostMessage_(*param\hWnd, #WM_LBUTTONDOWN, 0, MAKELPARAM(x, y))
PostMessage_(*param\hWnd, #WM_LBUTTONUP, 0, MAKELPARAM(x, y))
Else
PostMessage_(*param\hWnd, #WM_LBUTTONDOWN, 0, 0)
PostMessage_(*param\hWnd, #WM_LBUTTONUP, 0, 0)
EndIf
If i < clicks
Delay(GetDoubleClickTime_())
EndIf
Next
ProcedureReturn #True
Case #PB_Button_Right
For i = 1 To clicks
If x > -1 And y > -1
PostMessage_(*param\hWnd, #WM_RBUTTONDOWN, 0, MAKELPARAM(x, y))
PostMessage_(*param\hWnd, #WM_RBUTTONUP, 0, MAKELPARAM(x, y))
Else
PostMessage_(*param\hWnd, #WM_RBUTTONDOWN, 0, 0)
PostMessage_(*param\hWnd, #WM_RBUTTONUP, 0, 0)
EndIf
If i < clicks
Delay(GetDoubleClickTime_())
EndIf
Next
ProcedureReturn #True
EndSelect
EndIf
EndIf
EndProcedure
Re: AutoWin UserLibrary
Posted: Sun Oct 11, 2015 11:25 am
by Aleks_Longard
Hello all!
Help me please,
what activate mouseclick with global hotkeys?
I automation vst synth, and can't control the mouse with keyboard.
Re: AutoWin UserLibrary
Posted: Tue Oct 13, 2015 6:03 pm
by loulou2522
Hi Ts_soft
Can you help meon how to do an obj file with autoitx.dll to and tailbite. I want to adapt your library to PB 5.40
Thanks in advance
Re: AutoWin UserLibrary
Posted: Fri Aug 11, 2017 6:02 pm
by Pasch3
Hallo Thomas alias TS-Soft,
besteht die Möglichkeit, dass Du für AutoWin eine UserLibrary erstellst, die mit der aktuellen Purebasic -Version arbeitet?
Nette Grüße
Christian
Re: AutoWin UserLibrary
Posted: Fri Aug 11, 2017 6:10 pm
by RSBasic
@Pasch3
Am besten stellt er den Quellcode als Include zur Verfügung. Das wäre am besten. Dann kannst auch du den Code auf die neuste PB-Version anpassen, falls sich die Syntax einer Funktion o.ä. ändern sollte.
Re: AutoWin UserLibrary
Posted: Sat Aug 12, 2017 10:35 am
by Little John
Pasch3 wrote:Hallo Thomas alias TS-Soft,
besteht die Möglichkeit, dass Du für AutoWin eine UserLibrary erstellst, die mit der aktuellen Purebasic -Version arbeitet?
(asking ts-soft for creating an AutoWin userlib that is compatible with the current PB version)
ts-soft wrote:compile as tailbites userlib (not recommend)
Not recommending this is a good advice.
Re: AutoWin UserLibrary
Posted: Sat Aug 12, 2017 11:27 am
by highend
Where is the download link for this library?
The link in the very first posting leads to:
http://realsource.de/?page_id=9999999
Re: AutoWin UserLibrary
Posted: Sat Aug 12, 2017 11:52 am
by Little John
Hi,
maybe RSBasic has it in his archive ... I don't know.
Anyway, you can now
download the original AutoWin_1.4.1.zip file (including source code) from my Dropbox.