Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Sys.Exec problems
Index -> Programming, Turing -> Turing Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
TheGuardian001




PostPosted: Tue Apr 20, 2010 5:33 pm   Post subject: Re: Sys.Exec problems

Odd... It works fine for me... Dunno what to tell you.
Sponsor
Sponsor
Sponsor
sponsor
ProgrammingFun




PostPosted: Tue Apr 20, 2010 5:37 pm   Post subject: Re: Sys.Exec problems

TheGuardian001 @ Tue Apr 20, 2010 5:33 pm wrote:
Odd... It works fine for me... Dunno what to tell you.


Here is my code for reference:

Turing:

setscreen ("graphics,position:center;center, title:Geography Project Launcher, nobuttonbar")

var winID : int
winID := Window.Open ("position:center;center")

var font1 : int
font1 := Font.New ("calibri:16:bold")
Font.Draw ("Copyright Muhammad Osama 2010", 0, 5, font1, blue)

var inputwait : string (1)
var exitinput : string (1)

put "Welcome to the Geo Website Developer!"
put "To run the website manually, run Main Page.html in the Geography Project folder."
put "If the website is not compatible with your browser, please use one of the \npre-installed browsers in the Alternative Browsers folder."
put "\nPress any key to start the website..."
getch (inputwait)

put " "
if Sys.Exec ("\"Geography Project\\Main Page.html\"") then
    put "Executing now..."
    delay (1000)
    Window.Close (winID)
else
    put "Uh oh: ", Error.LastMsg, " You may have to run the file manually."
    put "\nPress any key to terminate this program..."
    getch (exitinput)
    Window.Close (winID)
end if


Perhaps it is a problem with my code...
TheGuardian001




PostPosted: Tue Apr 20, 2010 9:28 pm   Post subject: Re: Sys.Exec problems

Ah, I see your problem. You have your View.Set at the very start of your program, but later on you have a Window.Open call.

The first call made to Window.Open resets the default window and then gives it the parameters given to Window.Open, so all the stuff from your View.Set is overridden by your Window.Open. Either move your View.Set to after the Window.Open, or incorporate the View.Set parameters into the Window.Open call.
ProgrammingFun




PostPosted: Tue Apr 20, 2010 9:31 pm   Post subject: Re: Sys.Exec problems

TheGuardian001 @ Tue Apr 20, 2010 9:28 pm wrote:
Ah, I see your problem. You have your View.Set at the very start of your program, but later on you have a Window.Open call.

The first call made to Window.Open resets the default window and then gives it the parameters given to Window.Open, so all the stuff from your View.Set is overridden by your Window.Open. Either move your View.Set to after the Window.Open, or incorporate the View.Set parameters into the Window.Open call.


Thanks for the help!
Works perfectly now!
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 19 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: