simultaneous editing of program files

For making suggestions and/or requests for new features you'd like added to EViews.

Moderators: EViews Gareth, EViews Moderator

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: simultaneous editing of program files

Postby EViews Jason » Fri Aug 12, 2016 11:28 am

You could use

Code: Select all

run <mygoogledrive>:\testsave


but this assumes the file is named testsave.prg. Unfortunately you cannot use

Code: Select all

run <mygoogledrive>:\testsave.txt


I would look into getting google docs to open text files that do not have *.txt extensions (ie get google docs to open prg files by default).

tvonbrasch
Posts: 540
Joined: Fri Apr 15, 2011 5:35 am

Re: simultaneous editing of program files

Postby tvonbrasch » Fri Aug 12, 2016 9:56 pm

perfect, thanks again!
Thomas

tvonbrasch
Posts: 540
Joined: Fri Apr 15, 2011 5:35 am

Re: simultaneous editing of program files

Postby tvonbrasch » Tue Sep 06, 2016 4:37 am

After the last update, it works perfect! Being able to work on program files in Google Docs is great!

gdoc and eviews.JPG
gdoc and eviews.JPG (186.75 KiB) Viewed 9264 times

tvonbrasch
Posts: 540
Joined: Fri Apr 15, 2011 5:35 am

Re: simultaneous editing of program files

Postby tvonbrasch » Tue Jul 17, 2018 8:22 am

Hi Jason

in 2016 you stated that "2) We are still working on this one.".

any progress yet?
Thomas

tvonbrasch
Posts: 540
Joined: Fri Apr 15, 2011 5:35 am

Re: simultaneous editing of program files

Postby tvonbrasch » Wed Jul 18, 2018 6:30 am

Hi

Figured out an alternative way to execute Google Docs as EViews programs. Given a Google Document, such as,
google docs.PNG
google docs.PNG (31.99 KiB) Viewed 8131 times


use the FILE ID and insert it in the following program

Code: Select all

%fileid= "1-T-3yjhYNJbwk3-8z_zf1afdGVo63iYLBM7TNeZybXY"
call googledocs(%fileid) 'executes the Google Doc as EViews program


'-------------------------------------------------------------------------------
subroutine googledocs(string %fileid)
   %filename   = "googledocs_may_be_deleted.txt" 'will be saved in @runpath folder
   %dir=@runpath

   'downloading google doc as txt file
   %code1="wget https://docs.google.com/document/d/"
   %code2="/export?format=txt -OutFile "
   %code=%code1+%fileid+%code2+%dir+%filename
   shell powershell -command {%code}  'downloading google doc file

   'create txt file to execute program
   %t=@getnextname("_t") 'txt file
   text {%t} 'create text file
   {%t}.append(file) {%dir}\{%filename}
   {%t}.save {%dir}\googledocrunprogram.prg 'save text file as program
   exec {%dir}\googledocrunprogram 'execute new program file
   close {%t}
endsub


This way of doing it is a bit faster (takes 2,5 seconds instead of about 7 seconds when using the cloud connector in EViews) and Eviews will not unexpectedly shut down (viewtopic.php?f=9&t=19330)
Thomas
Attachments
google_docs_as_program_file_eviews_forum.prg
(929 Bytes) Downloaded 422 times


Return to “Suggestions and Requests”

Who is online

Users browsing this forum: No registered users and 7 guests