Announcement

Collapse
No announcement yet.

user input without using askForInput?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • user input without using askForInput?

    Is there any way to get user input (number) without having to invoke askForInput? This EFS doesn't look at any tick or market data, so it's OK if it hangs while waiting for user input.

    The problem with askForInput is that it clears all the variables and causes premain and main to be called again. It's true that variables can be saved in Global variables, but this is pretty messy.

  • #2
    Hello almerger,

    Other than Chart Options-->Edit Studies the only other available method is what I showed you in this thread.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      I've done the buttons with functions, that works great.

      I've also implemented the askForInput to get the number, using Global variables for saving data across the askForInput.

      I was hoping that there was an easier way to update the number dynamically while the EFS is running, but if I understand you correctly, there isn't (though one can get updated data from a disk file to avoid the askForInput problems).

      Comment


      • #4
        Hi Almerger:

        In other words you want to be able to, for example, click on a button and have a simple input dialog pop-up and request either numeric or string data from the user. When the user inputs this information the script would then use this new information to alter its own behavior WITHOUT reloading the script and/or changing the condition of any other variables.

        If this is what you are talking about then the only method I can think of to handle this would be to call a DLL function from within your script (the DLL function would display the dialog box and prompt the user to input data) and then using the numeric or string data returned by the DLL function to change the behavior of the running script. It takes a little work but I have used this method before and it works very well.

        Chris

        Comment


        • #5
          Yes, you got it right. I'll check out the DLL documentation. Thanks!

          Comment

          Working...
          X