Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Dec 15, 2018 10:34 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: External control of RS IDE
PostPosted: Fri Feb 22, 2013 11:57 am 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
i would like to be able to write an Applescript (or BASH) the can do the follow from TERMINAL command line


1) Launch RealStudio
2) Load a RS project (passed as a parameter to AS or BASH script)
3) Save said RS Project in XML or VC format
4) shut down RealStudio


Possible?

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: External control of RS IDE
PostPosted: Fri Feb 22, 2013 12:28 pm 
Offline

Joined: Tue Mar 23, 2010 8:44 pm
Posts: 673
Hey Dave, how's it going?

Since no one else has answered yet I'm going to jump in and get the ball going here.

I don't know anything about RS IDE scripts and maybe they can do some of what you want?
My advice below might be the retarded way of accomplishing what you want. If nothing else it hopefully gets people thinking and contributing to this thread.


DaveS wrote:
i would like to be able to write an Applescript (or BASH) the can do the follow from TERMINAL command line


Does it have to be an Applescript or BASH script?

I am not very familiar with them but I can say I think you certainly can do what you want using an RS console app.

DaveS wrote:
1) Launch RealStudio

RS console no problem, use f launch.
Shell script use open command.

DaveS wrote:
2) Load a RS project (passed as a parameter to AS or BASH script)

RS console apps can take parameters, right? Right. That means you can launch your project which starts RS IDE with your project or you can launch RS IDE first then later open your project by launching it.
Pretty sure shell scripts can do this easily too, but I don't remember the syntax (sorry).

DaveS wrote:
3) Save said RS Project in XML or VC format


Can RS scripting do this? I don't know but I have a possible workaround if it can't.

To perform the save in the RS IDE the RS console app would need to send the command keys for the save while the RS IDE is active (Command S on a Mac). That doesn't allow the saving of different file types, BUT if you set the preferences of your RS IDE you can set what file type you want to save as. That means you can keep two different versions of the RS IDE, one for saving as XML, and one for saving as VC. Then you have your RS console app or AS/shell script launch the correct version of the RS IDE you want the format saved as.

To get the RS console app to send the command keys to the RS IDE I personally would use MBS. I know you don't like using MBS so maybe you or someone else here can write the function to send the keyboard commands to RS IDE in RB code?

DaveS wrote:
4) shut down RealStudio

Same deal here. Just executing keyboard commands to the RS IDE while RS IDE is most active.

MBS I believe also has a easy way of making an app frontmost and most active, ensuring success.


Hope that helps.


Top
 Profile  
Reply with quote  
 Post subject: Re: External control of RS IDE
PostPosted: Fri Feb 22, 2013 12:34 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
console apps are not an option for this (at least for me) as the version of RS I have cannot compile them...... which is why I mentioned AS and BASH... and by the same token I don't have the ability to create Build Automation scripts either. :(

Do you (or anyone else) know what command line parameters RealStudio.app will accept?

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: External control of RS IDE
PostPosted: Fri Feb 22, 2013 12:53 pm 
Offline

Joined: Tue Mar 23, 2010 8:44 pm
Posts: 673
DaveS wrote:
console apps are not an option for this (at least for me) as the version of RS I have cannot compile them...... which is why I mentioned AS and BASH... and by the same token I don't have the ability to create Build Automation scripts either. :(


That is a bummer, sorry to hear.

DaveS wrote:
Do you (or anyone else) know what command line parameters RealStudio.app will accept?


Sorry, I don't. I don't have any idea if RS.app can accept any command line parameters at all.

I'm also beyond swamped for time so I can't afford to really do any research on this stuff, sorry. I'm having to deal with many other people helping them with their issues.

Family and friends are a real pain in the you know what.


Top
 Profile  
Reply with quote  
 Post subject: Re: External control of RS IDE
PostPosted: Fri Feb 22, 2013 11:08 pm 
Offline
User avatar

Joined: Thu Sep 10, 2009 2:50 am
Posts: 418
Location: Santa Cruz, CA, USA
haven't tried it for RS but maybe GUI scripting
http://www.macosxautomation.com/applescript/uiscripting/index.html


Top
 Profile  
Reply with quote  
 Post subject: Re: External control of RS IDE
PostPosted: Fri Feb 22, 2013 11:27 pm 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
Have a read of the guides in
Extras > IDE Scripting > IDE Scripting Read Me
and
Extras > IDE Scripting > RBIDEScript > ReadMe

They should give you some ideas

_________________
Norman Palardy (Real Software)


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

All times are UTC - 5 hours


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group