Lib2PBImport Version 1.2

Developed or developing a new product in PureBasic? Tell the world about it.
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 »

Denis wrote:And is it possible to display (on titlebar or statusbar) number of functions/selected functions
Number of functions is not a problem, but number of selected function. I will
not iterate all times, some libs over 5 MB.
Are number of all functions usefull?
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
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Post by Denis »

Yes, i think so
A+
Denis
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 »

@Denis
done :wink:
for selected functions, i will take a look later
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
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

no offense,
but why not manage Ascii/Unicode this way rather than the Macro way ?

Code: Select all

Import "shlwapi.lib"
  CompilerIf #PB_Unicode
  AssocQueryKey() As "_AssocQueryKeyA"
  AssocQueryString() As "_AssocQueryStringA"
  AssocQueryStringByKey() As "_AssocQueryStringByKeyA"
  CompilerElse
  AssocQueryKey() As "_AssocQueryKeyW"
  AssocQueryString() As "_AssocQueryStringW"
  AssocQueryStringByKey() As "_AssocQueryStringByKeyW"
  CompilerEndIf
EndImport
much shorter and cleaner than :

Code: Select all

Import "shlwapi.lib"
  AssocQueryKeyA() As "_AssocQueryKeyA"
  AssocQueryKeyW() As "_AssocQueryKeyW"
  AssocQueryStringA() As "_AssocQueryStringA"
  AssocQueryStringW() As "_AssocQueryStringW"
  AssocQueryStringByKeyA() As "_AssocQueryStringByKeyA"
  AssocQueryStringByKeyW() As "_AssocQueryStringByKeyW"
EndImport

Macro AssocQueryKey()
  CompilerIf #PB_Compiler_Unicode
  AssocQueryKeyW()
  CompilerElse
  AssocQueryKeyA()
  CompilerEndIf
EndMacro

Macro AssocQueryString()
  CompilerIf #PB_Compiler_Unicode
  AssocQueryStringW()
  CompilerElse
  AssocQueryStringA()
  CompilerEndIf
EndMacro

Macro AssocQueryStringByKey()
  CompilerIf #PB_Compiler_Unicode
  AssocQueryStringByKeyW()
  CompilerElse
  AssocQueryStringByKeyA()
  CompilerEndIf
EndMacro
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
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 »

@Flype
i use ANSI imports in Unicode-Application :wink:
In UserLibs for example
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
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

ok i understand,

and as an option ?
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
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 »

>> and as an option ?
this makes only the importfile shorter, but has not real a affect of the exe.
the sort of is ansi and unicode slows the generation, so, in the moment i will not change it, sry
mostly static libs have no ansi and unicode versions, only the ones from api,
the a mostly declared in pb.
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
KIKI
Enthusiast
Enthusiast
Posts: 145
Joined: Thu Dec 28, 2006 11:49 am
Location: FRANCE

Post by KIKI »

Can you explain me how to use the PBI file in a program with autoitx3.dll. I have a problem
KIKI
Enthusiast
Enthusiast
Posts: 145
Joined: Thu Dec 28, 2006 11:49 am
Location: FRANCE

Post by KIKI »

KIKI wrote:Can you explain me how to use the PBI file in a program with autoitx3.dll. I have a problem
In fact here is what Lib importer generate and it seems it's not good with argument

Code: Select all

Import "AutoItX3.lib"
  AU3_AutoItSetOption(a.s,b.l) As "_AU3_AutoItSetOption@8"
  AU3_ControlClick(a.l,b.l,c.l,d.l,e.l) As "_AU3_ControlClick@20"
  AU3_ControlCommand(a.l,b.l,c.l,d.l,e.l,f.l,g.l) As "_AU3_ControlCommand@28"
  AU3_ControlFocus(a.l,b.l,c.l) As "_AU3_ControlFocus@12"
  AU3_ControlSend(a.l,b.l,c.l,d.l,e.l) As "_AU3_ControlSend@20"
  AU3_ControlSetText(a.l,b.l,c.l,d.l) As "_AU3_ControlSetText@16"
  AutoItx3_Init() As "_AU3_Init@0"
  AU3_Run(a.s,b.s,c.l) As "_AU3_Run@12"
  AU3_Send(a.s,b.l) As "_AU3_Send@8"
  AU3_Sleep(a.l) As "_AU3_Sleep@4"
  AU3_WinActivate(a.l,b.l) As "_AU3_WinActivate@8"
  AU3_WinExists(a.l,b.l) As "_AU3_WinExists@8"
  AU3_WinWait(a.l,b.l,c.l) As "_AU3_WinWait@12"
  AU3_error() As "_AU3_error"
EndImport
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

KIKI wrote:Can you explain me how to use the PBI file in a program with autoitx3.dll. I have a problem
There should be some AutoIt wrapper examples here : http://www.purebasic.fr/english/viewtop ... torder=asc
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
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 »

@KIKI
here:

Code: Select all

Import "AutoItX3.lib"
  AU3_BlockInput(a.l) As "_AU3_BlockInput@4"
  AU3_ClipGet(a.l,b.l) As "_AU3_ClipGet@8"
  AU3_ClipPut(a.s) As "_AU3_ClipPut@4"
  AU3_Run(a.s,b.s="",c.l=0) As "_AU3_Run@12"
EndImport

AU3_BlockInput(1)
Delay(5000)
AU3_BlockInput(0)
AU3_Run("calc.exe")
AU3_CLipPut("PureBasic rulez")

buffer.s = Space(100)
AU3_ClipGet(@buffer, 100)
Debug buffer
works fine.
You have to create a stringbuffer for some functions!
See AutoIt3.h
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
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Denis wrote: And is it possible to display (on titlebar or statusbar) number of functions/selected functions
is possible in Version 1.1

Final Relaese 1.1

thx for all feedback, i hope it's usefull

Thanks to some authors of userlibs, that i have used:
pbosl_TryCatch by remi_meier
pbosl_LoadDLLMemory by Rings
egrid4 by srod
SyntaxHilighting.dll by freak

and thanks to edel, he has create the libreader und scintillagadget.

also thanks to all testers
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
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Great program, thanks a lot for this. 8)
I may look like a mule, but I'm not a complete ass.
JCV
Enthusiast
Enthusiast
Posts: 580
Joined: Fri Jun 30, 2006 4:30 pm
Location: Philippines

Post by JCV »

thanks for this nice tool. ;)
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Post by NoahPhense »

JCV wrote:thanks for this nice tool. ;)
very nice.. this is a very handy tool

- np
Post Reply