Page 1 of 1

Program Listing

Posted: Wed Jun 24, 2009 4:47 pm
by bufflotrip
I am using the trial version - can I get a list of my program in
a text file from start to finish ?

If so, is it possible to get some examples of programs in this format ?

Posted: Wed Jun 24, 2009 5:35 pm
by Klaus
Hi Mark,

A list of your programm???

Sorry, I have no idea what you are after...
Could you explain a little more?


Best from germany

Klaus

Posted: Wed Jun 24, 2009 5:40 pm
by bufflotrip
a listing as if I type the program into an editor by hand from start to finish

like writing a perl program


Thanks Klaus

like this

Posted: Wed Jun 24, 2009 5:44 pm
by bufflotrip
use Tk;
use Tk::Text;
use Tk::Frame;
use Tk::Widget;
use Tk::Wm;
use Tk::BrowseEntry;



$my_font = "-*-clean-medium-r-*-*-12-*-100-100-m-10-*-*" ;
$my_font2 = "-*-clean-medium-r-*-*-14-*-100-100-m-10-*-*" ;
$my_font2c = "-*-clean-bold-r-*-*-14-*-100-100-m-10-*-*" ;
$my_font3 = "-*-clean-medium-r-*-*-16-*-100-100-m-10-*-*" ;
$my_font4 = "-*-clean-medium-r-*-*-20-*-100-100-m-10-*-*" ;

$my_font_ECS_Label = "-*-clean-medium-r-*-*-24-*-100-100-m-10-*-*" ;
$my_font2b = "-*-clean-bold-r-*-*-*-100-100-100-m-10-*-*" ;

$topwindow=MainWindow->new();
$topwindow->configure( '-title'=> ' SSA Control-M GUI ');




$frame1 = $topwindow->Frame('-relief' => 'groove', '-borderwidth' => 3 );




$frame1->configure( '-background'=> '#d4d45b84a0aa' );
$frame12 = $frame1->Frame ('-relief' => 'groove', '-borderwidth' => 3 );
$frame13 = $frame1->Frame ('-relief' => 'groove', '-borderwidth' => 3 );


# Example $frame122 = $frame12->Frame ('-relief' => 'groove', '-borderwidth' => 3, '-width'=> 21 );




$frame121 = $frame12->Frame ('-relief' => 'groove', '-borderwidth' => 3 );
$frame122 = $frame12->Frame ('-relief' => 'groove', '-borderwidth' => 3 );


$frame1211 = $frame121->Frame ('-relief' => 'groove', '-borderwidth' => 3 );
$frame12111 = $frame1211->Frame ('-relief' => 'groove', '-borderwidth' => 3 );
$frame12112 = $frame1211->Frame ('-relief' => 'groove', '-borderwidth' => 3 );
$frame12113 = $frame1211->Frame ('-relief' => 'groove', '-borderwidth' => 3 );




$frame1212 = $frame121->Frame ('-relief' => 'groove', '-borderwidth' => 3 );
$frame12121 = $frame1212->Frame ('-relief' => 'groove', '-borderwidth' => 3 );
$frame12122 = $frame1212->Frame ('-relief' => 'groove', '-borderwidth' => 3 );
$frame12123 = $frame1212->Frame ('-relief' => 'groove', '-borderwidth' => 3 );




$frame1221 = $frame122->Frame ('-relief' => 'groove', '-borderwidth' => 3 );

$frame12211 = $frame1221->Frame ('-relief' => 'groove', '-borderwidth' => 3 );
$frame12212 = $frame1221->Frame ('-relief' => 'groove', '-borderwidth' => 3 );
$frame122121 = $frame12212->Frame ('-relief' => 'groove', '-borderwidth' => 3 );
$frame122122 = $frame12212->Frame ('-relief' => 'groove', '-borderwidth' => 3 );




$frame1222 = $frame122->Frame ('-relief' => 'groove', '-borderwidth' => 3 );

$frame131 = $frame13->Frame ('-relief' => 'groove', '-borderwidth' => 3 );
$frame132 = $frame13->Frame ('-relief' => 'groove', '-borderwidth' => 3 );
$frame1311 = $frame131->Frame ('-relief' => 'groove', '-borderwidth' => 3 );
$frame1312 = $frame131->Frame ('-relief' => 'groove', '-borderwidth' => 3 );
$frame1321 = $frame132->Frame ('-relief' => 'groove', '-borderwidth' => 3 );
$frame1322 = $frame132->Frame ('-relief' => 'groove', '-borderwidth' => 3 );


$AppLabel = $frame12111->Label ('-text'=>'Application Name ','-font'=>$my_font2)->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);
$AppLabel = $frame12111->Label ('-text'=>'Test Emods ','-font'=>$my_font2c)->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);
$GroupLabel = $frame12112->Label ('-text'=>'Group Name ','-font'=>$my_font2)->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);
$groupbox = $frame12112->Entry ('-textvariable'=> $timeAPP,'-width'=>16,'-font'=>$my_font2)->pack('-side'=>"right", '-pady' => 2, '-padx' => 2);
$jobLabel = $frame12113->Label ('-text'=>'Job Name ','-font'=>$my_font2)->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);
$jobbox = $frame12113->Entry ('-textvariable'=> $timeAPP,'-width'=>16,'-font'=>$my_font2)->pack('-side'=>"right", '-pady' => 2, '-padx' => 2);

$time_ckbutton = $frame12211->Checkbutton ('-text'=> "Time Triggered ?",'-font'=>$my_font3)->pack('-side'=>"top", '-pady' => 2, '-padx' => 2);

$timeLabel = $frame122121->Label ('-text'=>'Enter Time ','-font'=>$my_font2)->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);
$timebox = $frame122121->Entry ('-textvariable'=> $timeAPP,'-width'=>6,'-font'=>$my_font2)->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);
$amRadio = $frame122122->Radiobutton ('-text'=>'a.m.','-variable'=>\$ampmq,'-value'=>"am")->pack('-side'=>"top");
$pmRadio = $frame122122->Radiobutton ('-text'=>'p.m.','-variable'=>\$ampmq,'-value'=>"pm")->pack('-side'=>"left");






$ownerLabel = $frame12121->Label ('-text'=>'Owner Name: ','-font'=>$my_font2)->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);
$ownerLabel = $frame12121->Label ('-text'=>'Mark Scherer ','-font'=>$my_font2c)->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);
$counterLabel = $frame12122->Label ('-text'=>'Job Counter: ','-font'=>$my_font2)->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);
$counterbox = $frame12122->Entry ('-textvariable'=> $timeAPP,'-width'=>3,'-font'=>$my_font2)->pack('-side'=>"right", '-pady' => 2, '-padx' => 2);

$registerbutton = $frame12123->Button ('-text'=> "Register New Group",'-font'=>$my_font2,'-width'=>20, '-activebackground'=> '#feb7e62308ea' , '-background'=> '#d4d4c20671dd' ,'-command'=> sub { Submit_Appointment() } )->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);













# $messagebutton3 = $frame1322->Button ('-text'=> "Submit",'-font'=>$my_font2,'-width'=>10, '-activebackground'=> '#feb7e62308ea' , '-background'=> '#d4d4c20671dd' ,'-command'=> sub { Submit_Appointment() } )->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);


# $messagebutton4 = $frame1221->Button ('-text'=> "Submit",'-font'=>$my_font2,'-width'=>10, '-activebackground'=> '#feb7e62308ea' , '-background'=> '#d4d4c20671dd' ,'-command'=> sub { Submit_Appointment() } )->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);
# $messagebutton5 = $frame1321->Button ('-text'=> "Submit",'-font'=>$my_font2,'-width'=>10, '-activebackground'=> '#feb7e62308ea' , '-background'=> '#d4d4c20671dd' ,'-command'=> sub { Submit_Appointment() } )->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);











$frame1 -> pack('-side' => 'top',
'-fill' => 'x',
'-pady' => 2,
'-padx' => 2 );
$frame12 -> pack('-side' => 'top',
'-fill' => 'x',
'-pady' => 2,
'-padx' => 2 );
$frame13 -> pack('-side' => 'bottom',
'-fill' => 'x',
'-pady' => 2,
'-padx' => 2 );



$frame121 -> pack('-side' => 'top',
'-fill' => 'x',
'-pady' => 2,
'-padx' => 2 );
$frame122 -> pack('-side' => 'bottom',
'-pady' => 2,
'-padx' => 2 );
$frame1211 -> pack('-side' => 'left',
'-pady' => 2,
'-padx' => 2 );




$frame12111 -> pack('-side' => 'top',
'-pady' => 2,
'-padx' => 2 );

$frame12112 -> pack('-pady' => 2,
'-padx' => 2 );

$frame12113 -> pack('-side' => 'bottom',
'-pady' => 2,
'-padx' => 2 );







$frame1212 -> pack('-side' => 'right',
'-fill' => 'x',
'-pady' => 2,
'-padx' => 2 );


$frame12121 -> pack('-side' => 'top',
'-pady' => 2,
'-padx' => 2 );

$frame12122 -> pack('-pady' => 2,
'-padx' => 2 );

$frame12123 -> pack('-side' => 'bottom',
'-pady' => 2,
'-padx' => 2 );








$frame1221 -> pack('-side' => 'left',
'-pady' => 2,
'-padx' => 2 );

$frame12211 -> pack('-side' => 'top',
'-pady' => 2,
'-padx' => 2 );

$frame12212 -> pack('-side' => 'bottom',
'-pady' => 2,
'-padx' => 2 );

$frame122121 -> pack('-side' => 'left',
'-pady' => 2,
'-padx' => 2 );


$frame122122 -> pack('-side' => 'right',
'-pady' => 2,
'-padx' => 2 );






$frame1222 -> pack('-side' => 'right',
'-fill' => 'x',
'-pady' => 2,
'-padx' => 2 );



$frame131 -> pack('-side' => 'top',
'-fill' => 'x',
'-pady' => 2,
'-padx' => 2 );
$frame132 -> pack('-side' => 'bottom',
'-pady' => 2,
'-padx' => 2 );
$frame1311 -> pack('-side' => 'top',
'-pady' => 2,
'-padx' => 2 );
$frame1312 -> pack('-side' => 'bottom',
'-fill' => 'x',
'-pady' => 2,
'-padx' => 2 );
$frame1321 -> pack('-side' => 'top',
'-pady' => 2,
'-padx' => 2 );
$frame1322 -> pack('-side' => 'bottom',
'-fill' => 'x',
'-pady' => 2,
'-padx' => 2 );






MainLoop;


sub Submit_Appointment {

$timeee = $timebox -> get ;
$timeee =~ s/:/-/;
$dateee = $datebox -> get ;
$message = $messagebox -> get ;


$filee = "C:\\PageCal\\" . "cal " . $timeee . " " . $ampmq . " " . $dateee . " sub " . $message . "\.txt" ;

# print STDOUT ("scp2 \"$filee\" u0864\@s00dee1\:\/apps1\/users\/mscherer\/\. ------\n");

open (CALFILE,">$filee");
print CALFILE ($filee," ");
close (CALFILE);

`scp2 \"$filee\" u0864\@s00dee1\:\/apps1\/users\/mscherer\/markcal\/\.`;



}


sub trash {


$timeLabel = $frame11->Label ('-text'=>'Enter Time ','-font'=>$my_font2)->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);
$timeLabel = $frame11->Label ('-text'=>'Enter Date (Jun 24) ','-font'=>$my_font2)->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);
$messageLabel = $frame11->Label ('-text'=>' Message ','-font'=>$my_font2)->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);
$timebox = $frame121->Entry ('-textvariable'=> $timeAPP,'-width'=>6,'-font'=>$my_font2)->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);
$amRadio = $frame122->Radiobutton ('-text'=>'a.m.','-variable'=>\$ampmq,'-value'=>"am")->pack('-side'=>"top");
$pmRadio = $frame122->Radiobutton ('-text'=>'p.m.','-variable'=>\$ampmq,'-value'=>"pm")->pack('-side'=>"bottom");
$datebox = $frame123->Entry ('-textvariable'=> $dateAPP,'-width'=>11,'-font'=>$my_font2)->pack('-side'=>"left", '-pady' => 2, '-padx' => 22);
$messagebox = $frame124->Entry ('-textvariable'=> $messAPP,'-width'=>60,'-font'=>$my_font2)->pack('-side'=>"left", '-pady' => 2, '-padx' => 22);
$messagebutton = $frame125->Button ('-text'=> "Submit",'-font'=>$my_font2,'-width'=>10, '-activebackground'=> '#feb7e62308ea' , '-background'=> '#d4d4c20671dd' ,'-command'=> sub { Submit_Appointment() } )->pack('-side'=>"left", '-pady' => 2, '-padx' => 2);







}

Posted: Wed Jun 24, 2009 6:19 pm
by FourthWorld
When I first started working with languages like Rev I used to write utilities that would walk through the objects and dump descriptions of them and their scripts into a text file.

But over the years I found myself not using them, and I'm not even sure I have any such utilities on my last three hard drives.

Instead, I built a universal script search which, combined with a good object browser, covers everything I had hoped to gain from my old text dumps but with the added benefit of working right in the living code/object model, so if I need to do anything with that information I'm in the right place to do so.

Can you describe what you're aiming to do with the text file? Perhaps someone here can point you to a utility for that, or some other solution which might possibly be a step more useful for you.

Posted: Wed Jun 24, 2009 6:21 pm
by bufflotrip
I just want to write my program by hand after I did the GUI part
with the GUI builder

then I want to view my program from start to finish in a text file
just like you would write any script or computer program.

Posted: Wed Jun 24, 2009 7:25 pm
by Klaus
Hi Mark,

I once made such a utility, which lists a lot of properties of a stack including the scripts.
Here is the direct link:
http://www.major-k.de/staxx/analyze_it.mc.zip

But there is a nice script editor in Rev, so why not use it?
OK, OK, its up to you :-)


Best

Klaus


P.S.
One or two lines of the listing would have done to make me get the picture ;-)

Posted: Wed Jun 24, 2009 7:51 pm
by FourthWorld
bufflotrip wrote:I just want to write my program by hand after I did the GUI part
with the GUI builder

then I want to view my program from start to finish in a text file
just like you would write any script or computer program.
I understand what you want to do, I'm asking why you want to do it. There may be a way to get the same or better result depending on the goal of this exercise.

Posted: Wed Jun 24, 2009 9:04 pm
by Garrett
FourthWorld wrote:
bufflotrip wrote:I just want to write my program by hand after I did the GUI part
with the GUI builder

then I want to view my program from start to finish in a text file
just like you would write any script or computer program.
I understand what you want to do, I'm asking why you want to do it. There may be a way to get the same or better result depending on the goal of this exercise.
Likely force of habit from using other programming paradigms such as perl, javascript and most basic and scripting languages where all your code is a single source code file and shown so in the ide.

I had a bit of a hard time adapting to the "code goes with the object" myself.