MSDNOnlineHelp for PB4 IDE

Share your advanced PureBasic knowledge/code with the community.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

MSDNOnlineHelp for PB4 IDE

Post by ts-soft »

Code updated for 5.20+

This is a little IDE Tool.
It search on MSDN (Internet) for the word under the cursor in the IDE

Only add it to the "Tools" and give a shortcut like Ctrl + F1, and using '%WORD' for its arguments.

Code: Select all

Define.s Word
Word = GetEnvironmentVariable("PB_TOOL_Word")
If Word
  If Right(Word, 1) = "_"
    Word = Left(Word, Len(Word) -1)
  ElseIf Left(Word, 1) = "#"
    Word = Right(Word,Len(Word) -1)
  EndIf
  RunProgram("rundll32.exe","url.dll,FileProtocolHandler http://www.google.de/search?q=site:msdn.microsoft.com+msdn+win32+" + Word + "&btnI=true", "")
EndIf
You can't test the source, only the exe as tool!!!
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
einander
Enthusiast
Enthusiast
Posts: 744
Joined: Thu Jun 26, 2003 2:09 am
Location: Spain (Galicia)

Post by einander »

Thanx!
Very useful!
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

thanks for sharing it! very nice feature!
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

Cool 8)
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 »

My biggest project in PB4 Beta 1 :lol:
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
Fred
Administrator
Administrator
Posts: 18252
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

works nicely :).
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

Very handy. Thank you. :P

Just a little question : what's the difference between :

Code: Select all

RunProgram("rundll32.exe","url.dll,FileProtocolHandler http://www.google.de/search?q=site:msdn.microsoft.com+msdn+win32+" + Word + "&btnI=true", "")
And

Code: Select all

RunProgram("http://www.google.de/search?q=site:msdn.microsoft.com+msdn+win32+" + Word + "&btnI=true")
I guess that first one is api-dependant, but what else ?
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 »

It's use the same FileProtocolHandler, as the IE. Webserver from M$ are optimized for IE. I hope it's give better results :wink:
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 »

Yes but if my default browser is FireFox or Opera, it actually continue to open it in my defaut browser. :roll:
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
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: MSDNOnlineHelp for PB4 IDE

Post by PB »

Made this topic Sticky because it's an important tool for Windows users. :)

@Fred: Grrr! ;)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

VERY NICE TIP! :D
--Kale

Image
Fred
Administrator
Administrator
Posts: 18252
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: MSDNOnlineHelp for PB4 IDE

Post by Fred »

PB wrote:Made this topic Sticky because it's an important tool for Windows users. :)

@Fred: Grrr! ;)
With the IDE, you have a special access to the whole MDSN if you install it and remove the Win32.hlp from the help directory.
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 »

Microsoft SDK has 920 MB
My Tool ... :wink:
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
Fred
Administrator
Administrator
Posts: 18252
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

It's still a must have if you want to do serious development :P
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Post by NoahPhense »

Fred wrote:It's still a must have if you want to do serious development :P
I have the Platform SDK, 2 win32.dll's, the old one and the new one. ;)

ASM - Optimizing.hlp
ASM.hlp
FPU.hlp

and a few others.. can't have enough docs around.

- np
Post Reply