Jump to content

Recommended Posts

It is working, provided you run one of the other scripts first. Otherwise the variable is still empty.

Share this post


Link to post
Share on other sites
45 minutes ago, comment said:

It is working, provided you run one of the other scripts first. Otherwise the variable is still empty.

Means we need to set 

set variable [ $$time ; value; get(current time) ]

before window title ????

 

Screenshot 2019-01-29 at 19.02.27.png

 

why its not working by dragging the data from global variables script ????

 

 

Screenshot 2019-01-29 at 19.03.16.png

Screenshot 2019-01-29 at 19.03.21.png

Edited by Dr.Gopala krishnam raju AMBATI

Share this post


Link to post
Share on other sites

It means that you need to execute the script step:

Set Variable [ $$date; Value:Get ( CurrentDate ) ]

before you try executing:

Set Window Title [ Current Window; New Title: $$date ]

It doesn't matter if the Set Variable[] step is in the same script or not. The variable being set is global, so it will remain in scope until the end of the current session. The only thing that matters is that the step is performed. Otherwise the variable does not exist, and you are setting the window title to an empty string.

Share this post


Link to post
Share on other sites
11 minutes ago, comment said:

The only thing that matters is that the step is performed. Otherwise the variable does not exist, and you are setting the window title to an empty string.

1

Now got the point - we need to execute global variable step so it stays till the file is open  whether its in that or other script , once executed we can manipulate with our own script steps 

Share this post


Link to post
Share on other sites

Many developers use a script that runs on opening the file to populate some global variables. You'd probably not want to do this with current date or time, but it is convenient for values stored as preferences that need to be accessible from any context.

  • Like 2

Share this post


Link to post
Share on other sites
6 minutes ago, comment said:

Many developers use a script that runs on opening the file to populate some global variables. You'd probably not want to do this with current date or time, but it is convenient for values stored as preferences that need to be accessible from any context.

since 2010 I'm using FM but never used any global variable in my solution, today wanted to test global var to see  how it works read a lot of data practically but I understood just now 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.