AutoIT V3 DLL wrapper Library

Developed or developing a new product in PureBasic? Tell the world about it.
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

Thanks for the info.
User avatar
GG
Enthusiast
Enthusiast
Posts: 258
Joined: Tue Jul 26, 2005 12:02 pm
Location: Lieusaint (77), France

Problem with AU3_ClipGet_()

Post by GG »

HI all,

I've got a problem with the function AU3_ClipGet_() which tells me : incorrect number of parameters when i try to compile

Code: Select all

version1 = 0
version2  = 0
version3 = 1
#WindowWidth  = 800
#WindowHeight = 600
Dim Mois_date(12)
Dim suppr$(2)
Global CheminAppli$
Global Delim$
cheminappli$=""
Delim$="|"
Global nbclients
Global url$
Global notel$
Global file$
Global boucle




OpenConsole()
repert$=ProgramParameter()

If repert$="" 

  PrintN("")
  PrintN("XXXX v"+Str(version1)+"."+Str(version2)+"."+Str(version3)+" <Répertoire>")
  PrintN("")
  CloseConsole()
Else
RunProgram("c:\program files\internet explorer\iexplore.exe")
Delay(2000)
AU3_send_("{TAB}",0)

AU3_send_("www.yahoo.com",0)
AU3_send_("{ENTER}",0)
ok=0
While ok=0
Delay(2000)
AU3_send_("{^A}",0)
AU3_send_("{^C}",0)
clip$=AU3_ClipGet_()
If FindString(clip$,"hello",0)>0
  ok=1
EndIf
Wend
ExamineDirectory(0,repert$,"u*.txt")

    
    
        
CloseConsole()
EndIf
Any idea ?
Thanks in advance.
Purebasic 6.04 64 bits - Windows 11 Pro 64 bits 23H2
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Re: Problem with AU3_ClipGet_()

Post by Beach »

GG wrote:I've got a problem with the function AU3_ClipGet_()..
You will need to use a pointer for this function, here is an example:

Code: Select all

RunProgram("notepad")
AU3_WinActivate_("Untitled - Notepad","")
Delay(250)
AU3_Send_("testing one two three",0)
AU3_Send_("^a",0)
AU3_Send_("^c",0)

*temp.s = Space(1024)
AU3_ClipGet_(*temp,1024)
clip$ = PeekS(*temp)

Debug clip$
Good luck!
-Beach
User avatar
GG
Enthusiast
Enthusiast
Posts: 258
Joined: Tue Jul 26, 2005 12:02 pm
Location: Lieusaint (77), France

Post by GG »

Thanks a lot for the code. It works great !!
Purebasic 6.04 64 bits - Windows 11 Pro 64 bits 23H2
User avatar
GG
Enthusiast
Enthusiast
Posts: 258
Joined: Tue Jul 26, 2005 12:02 pm
Location: Lieusaint (77), France

Post by GG »

Another problem however :

I can't get from the clipboard with this method more than 2200 characters. Is it normal ? Functions space(), AU3_ClipGet_() and PeekS() allocate enough memory (in my example 20000) however.

Any ideas ?

Thanks a lot in advance
Purebasic 6.04 64 bits - Windows 11 Pro 64 bits 23H2
User avatar
GG
Enthusiast
Enthusiast
Posts: 258
Joined: Tue Jul 26, 2005 12:02 pm
Location: Lieusaint (77), France

Post by GG »

Finally, that's OK, no problem... :oops:
Purebasic 6.04 64 bits - Windows 11 Pro 64 bits 23H2
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

You can also use my lib.
No buffer
No pointer
PB-Like result

Code: Select all

RunProgram("notepad")
AU3_WinActivate("Untitled - Notepad","")
Delay(250)
AU3_Send("testing one two three",0)
AU3_Send("^a",0)
AU3_Send("^c",0)


clip$ = AU3_ClipGet()

Debug clip$ 
only the help is in german, but you can use the english-one

http://www.purearea.net/pb/showcase/show.php?id=250
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Post by Beach »

Man... I should really search the German forums before spending time on projects like this. :cry:
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Beach wrote:Man... I should really search the German forums before spending time on projects like this. :cry:
I have published my lib after you, but at beginning my lib, there was no lib in all forums :wink:

I use AutoIt over years
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
HAnil
User
User
Posts: 87
Joined: Thu Feb 26, 2004 5:42 pm
Location: 28:58E 41:01N

Post by HAnil »

http://www.purearea.net/pb/showcase/show.php?id=250

link is not working.
How can I download this wrapper ?

HAnil
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Post by Beach »

-Beach
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

Similar (some report said "better"): http://www.autohotkey.com/

Edit: but I don't think there is a dll/activex interface
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

HAnil wrote:http://www.purearea.net/pb/showcase/show.php?id=250

link is not working.
How can I download this wrapper ?

HAnil
New Version is in progress, but TailBite is not finished.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Intrigued
Enthusiast
Enthusiast
Posts: 501
Joined: Thu Jun 02, 2005 3:55 am
Location: U.S.A.

Post by Intrigued »

dmoc wrote:Similar (some report said "better"): http://www.autohotkey.com/

Edit: but I don't think there is a dll/activex interface
Coo'!
Intrigued - Registered PureBasic, lifetime updates user
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

New Lib is finished but TailBite isn't, so you can download the source only.

2 new functions:

Code: Select all

AU3_GetStringBuffer(); Default = 4000 Chars
AU3_SetStringBuffer(nSize.l)
Tell me, if you found any bug!

Download: http://purebasic.ts-soft-online.de/dl/autoitx3.zip
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Post Reply