It is currently Tue Mar 09, 2021 9:56 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Switch between file.pbi and file.pb?
PostPosted: Sun Jul 28, 2013 4:15 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Apr 26, 2003 2:49 pm
Posts: 703
I'm looking for a way to quickly switch from a file and its include or viceversa, can an external tool do it?
I don't see any option to select a file for an external tool.


Top
 Profile  
Reply with quote  
 Post subject: Re: Switch between file.pbi and file.pb?
PostPosted: Sun Jul 28, 2013 4:31 pm 
Offline
Addict
Addict

Joined: Fri Nov 09, 2012 11:04 pm
Posts: 1817
Location: Uttoxeter, UK
Hi Justin,

If you just double-click on the Keyword Include then the file will be loaded into the IDE.

I am sure that this is not exactly what you want, but I hope it might help.

_________________
DE AA EB


Top
 Profile  
Reply with quote  
 Post subject: Re: Switch between file.pbi and file.pb?
PostPosted: Sun Jul 28, 2013 4:46 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 3414
Location: Boston, MA
Not until this is released...
A workaround freak mentioned is to make a Tool that opens your file provided you check "Run only one instance of the IDE".
Code:
exe$ = GetEnvironmentVariable("PB_TOOL_IDE")
RunProgram(exe$, "c:\myproject\myinclude.pbi /L 1", "c:\myproject")
The problem is jumping back and forth and feeding the name of your files.

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: Switch between file.pbi and file.pb?
PostPosted: Sun Jul 28, 2013 5:20 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Apr 26, 2003 8:26 am
Posts: 2999
Location: Planet Earth
skywalk wrote:
The problem is jumping back and forth and feeding the name of your files.

If the filename is the same, just switch between extension .pb and .pbi:
Code:
IDE.s  = GetEnvironmentVariable("PB_TOOL_IDE")
FILE.s = ProgramParameter(0)

If FILE And IDE
    If LCase(GetExtensionPart(FILE)) = "pbi"
        FILE = Left(FILE, Len(FILE)-1)
    ElseIf LCase(GetExtensionPart(FILE)) = "pb"
        FILE + "i"
    EndIf
   
    ;MessageRequester("INFO",FILE)
    If FileSize(FILE) >= 0
        RunProgram(IDE, #DQUOTE$+FILE+#DQUOTE$, #DQUOTE$+GetPathPart(FILE)+#DQUOTE$)
    EndIf
EndIf

Requires argument "%FILE" (with double quotes) in the tool settings.


Top
 Profile  
Reply with quote  
 Post subject: Re: Switch between file.pbi and file.pb?
PostPosted: Sun Jul 28, 2013 6:10 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Apr 26, 2003 2:49 pm
Posts: 703
Thanks Danilo, that works fine.
skywalk, that post is from 2011 i guess it has stopped?
davido, i knew that thanks anyways.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye