Page 5 of 11

CodeCaddy v1.64x build 740 27.02.10 save 7780

Posted: Sat Feb 27, 2010 10:56 am
by blueznl
New version v1.64x build 740 27.02.10 save 7780.

- code is now compatible with PureBasic 4.41x
- minor additional logfile info
- changed Alt+F1 functionality (inspired by Chi's)

As I never used Alt+F1 I've adopted (stolen :-)) Chi's idea. From within the IDE this now brings the following options:

When not on a keyword:

- F1 - regular PB IDE help
- Ctrl+F1 - info on currently loaded code
- Alt+F1 - launch FireFox then load the PureBasic forum

When on a keyword:

- F1 - regular PB IDE help or WIN32.HLP
- Ctrl+F1 - search current, included, and specified code locally
- Alt+F1 - launch FireFox then google for the specified search term

(If the keyword ends on an underscore MSDN will be searched as well. For the moment the web search paths are hardcoded but hey, source is included :-))

As usual, the file is here:

http://www.xs4all.nl/~bluez/purebasic/codecaddy.zip

If you have no clue what CodeCaddy is all about go here:

http://www.xs4all.nl/~bluez/purebasic/purebasic 29.htm#codecaddy

Note: I've changed my homepage, so older links may or will no longer work. Please use the ones above.

Re: CodeCaddy v1.60x build 719 10.10.09 save 7689

Posted: Sat Feb 27, 2010 12:04 pm
by DoubleDutch
I've tried the latest version (v1.65x b743 27.02.10 save 7783) and the alt-f1 stuff just does the same as the ctrl f1. It doesn't launch firefox.

I'm running x64 windows 7 if that makes a difference?

Re: CodeCaddy v1.60x build 719 10.10.09 save 7689

Posted: Sat Feb 27, 2010 1:21 pm
by blueznl
Duh! That should not happen... Ah wait :-)

Did you do a new 'install in PB IDE' ?

Otherwise Alt+F1 is mapped to the wrong function :-)

Re: CodeCaddy v1.60x build 719 10.10.09 save 7689

Posted: Sat Feb 27, 2010 1:49 pm
by DoubleDutch
Yes I did, I even tried running cde caddy as an admin.

they both go to codecaddy.exe

ctrl arguements:
find "%FILE" "%WORD"

alt arguements:
find "%TEMPFILE" "%WORD"

Any ideas?

Re: CodeCaddy v1.60x build 719 10.10.09 save 7689

Posted: Sat Feb 27, 2010 1:55 pm
by DoubleDutch
I see whats happened - the tools.prefs your editing is within the purebasic folder - But the tools.prefs that PureBasic is using is in the app data folder. Maybe it should update both files if they exist?

Re: CodeCaddy v1.60x build 719 10.10.09 save 7689

Posted: Sat Feb 27, 2010 2:20 pm
by blueznl
Hmmm. I have to update that part of the code. It checks in two places, but I think I have not properly supported all flavours on windows yet. I need to work out where each flavour of Windows and thus PureBasic stores its data, and then modify the proper file. It worked fine under XP, but I haven't tested that part properly on Vista and Windows 7.

I'm adding a tab to the preferences to allow changes to those 'hardcoded' options, then I'll have a look at all those default folders... I was planning to have a peek at it anyway for the Survival Guide.

Suggestions and links welcome :-)

Hmmm.. Just re-read your post. You mean you have TWO tools.prefs? Did CodeCaddy create the second one, or was it already there?

Re: CodeCaddy v1.60x build 719 10.10.09 save 7689

Posted: Sat Feb 27, 2010 5:08 pm
by DoubleDutch
I think it created it - didn't see it before. May be wrong though.

Re: CodeCaddy v1.60x build 719 10.10.09 save 7689

Posted: Sat Feb 27, 2010 6:10 pm
by blueznl
It is possible. I do not have Windows 7 so I cannot confirm where PureBasic stores its files. Could people with Windows 7, Vista, and 64 bits versions shed a little light on this for me? Thanks in advance.

Re: CodeCaddy v1.60x build 719 10.10.09 save 7689

Posted: Sat Feb 27, 2010 6:56 pm
by chi
i didn“t test all features of codecaddy yet but i really love your reformat function. i tend to use pb-extension before. sometimes it crashed the ide and all unsaved code was gone...
not any longer! :D thank you!

Re: CodeCaddy v1.60x build 719 10.10.09 save 7689

Posted: Sat Feb 27, 2010 7:10 pm
by DoubleDutch
On windows 7 it's here:

Code: Select all

Procedure.s MyGetSpecialFolderLocation(val) 
  If Not SHGetSpecialFolderLocation_(0,val,@id)
    path$=Space(#MAX_PATH)
    SHGetPathFromIDList_(id,@path$) 
    If Not path$
    	Select val
    		Case	#CSIDL_PROGRAM_FILES:var$="ProgramFiles"

    	EndSelect
    	If var$
    		path$=GetEnvironmentVariable(var$)
    	EndIf
    EndIf
    If path$ 
      If Right(path$,1)<>"\" 
        path$+"\" 
      EndIf 
    EndIf 
  EndIf 
  ProcedureReturn path$
EndProcedure 

Debug(MyGetSpecialFolderLocation(#CSIDL_APPDATA))+"PureBasic\"

Re: CodeCaddy v1.60x build 719 10.10.09 save 7689

Posted: Sat Feb 27, 2010 7:15 pm
by blueznl
I've been using CodeCaddy myself since 2005, so some parts seem to be somewhat stable :-)

It actually has crashed on me perhaps twice a year ;-) but thus far I've never lost code in five years.

Re: CodeCaddy v1.60x build 719 10.10.09 save 7689

Posted: Sat Feb 27, 2010 7:32 pm
by DoubleDutch
I've also been using it virtually every day all day 247 - no crashes so far! :D

It should be built-in to the proper ide.

Re: CodeCaddy v1.60x build 719 10.10.09 save 7689

Posted: Sat Feb 27, 2010 10:54 pm
by blueznl
Just upped v1.67. You can now configure how the internet search behaves. All config is hidden in the 'preferences' panel. Though it mentions 'Google' and the command line command is 'google' nothing is going to stop you using another browser and / or search engine. Just go into the 'preferences / web' panel and stare at those lines until you have a headache :-)

Note that the config file has changed a little! (This is due to some changes in my 'shared' x_lib.pb.)

I noticed PB stores its tools.prefs in different places, depending on the PB version, and the OS it runs on. Sigh. Windows again, I guess... Still something to work on.

Re: CodeCaddy v1.60x build 719 10.10.09 save 7689

Posted: Sat Feb 27, 2010 11:52 pm
by DoubleDutch
Maybe Fred/Freak could shine some light on this? (where the prefs is officially stored)

Re: CodeCaddy v1.60x build 719 10.10.09 save 7689

Posted: Mon Mar 01, 2010 10:29 pm
by blueznl
I've just upped a new version with a better 'install in PB IDE' function, it should find the tools.prefs file under any Windows flavour, in fact, it should even find multiple occurences of that file, and modify them all :-)

If someone could test this on Windows 7 and any other 64 bits flavours, and on machines with limited user rights I would appreciate it. Note: you don't HAVE TO let CodeCaddy modify your tools.prefs file, you can select Cancel when CodeCaddy asks you to confirm, but it will still list all found tools.prefs files that are probably purebasic's.