Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2009
    Posts
    35

    A few scripting questions

    I came across a few unwanted things which may have a simple solution, but I didn't find them yet:

    1: I want to add a timed page which returns to the main menu, but only if there is no activity for a certain amount of time, let's say one minute.
    So: if nothing happens for one minute jump back to page 1. As soon as something happens like a button press the timer should restart at 0.
    With the normal on preload / on timer jump page it just counts one minute and goes back.

    2: Can I add a button which sends the TAB button? Like the Enter button is \r, is there also a code for TAB?

    3: Can I make a button which sends it result (in this case just one letter per button, as in on-screen keyboard) to a web page in stead of to a input field. I already tried replacing "Input1" to "Web1" but it doesn't work.

    Thanks again!

  2. #2
    Join Date
    Aug 2003
    Posts
    2,427
    Just a couple of thoughts -

    1. Create a global function and call it in all the events that you want to be a valid cancellation of the timer. Alternatively just put code to reset the timer/counter in the page "On Mouse Move" event.

    2. Nothing springs immediately to mind except using "sendkey" but I've never tried it.

    3. Concatenate to a string on each button click and in the same code overwrite the contents of the html page being displayed by the web object, probably use the refresh tag in the header of the html to constantly refresh the page.

  3. #3
    Join Date
    Oct 2009
    Posts
    35
    I'll try the first two, maybe for 3 a fill in form that mails is good too.
    I tried it but I only see this mail function which tries to mail through Outlook (express)/Windows Mail. This is fine with me as long as it sends the email without the user noticing it.
    The plan is to have a form that can be filled in with the onscreen keyboard I made and after clicking SEND it should send the form's contents through email.
    I thought a local webpage was the easiest option, but I think if it's so difficult a APMS form will do as good or better, as long as I have an email option which is not seen by the user.

  4. #4
    Join Date
    Aug 2003
    Posts
    2,427
    I was thinking that we were talking about a local html file, if the web object being displayed is from the web then I would think you are going to have problems trying to implement what is more or less real time updating of a web page from your app - nothing ventured as the saying goes

    p.s. - Just having read your other post, it sounds to me as if you'd be better off designing your web page with an inline form which can be submitted directly from the page.
    Last edited by longedge; 10-15-2009 at 02:39 PM.

  5. #5
    Join Date
    Oct 2009
    Location
    127.0.0.1
    Posts
    279
    Here is a quick example project of everything but the web functions. I didn't have a lot of time to work on this so it's a bit disorganized.

    Do you have PHP support on your server? If so I can probably make you an example that will update input to a php page.
    Attached Files
    There are 10 types of people in the world: those who understand binary, and those who don't.

  6. #6
    Join Date
    Oct 2009
    Posts
    35
    The mouse thing is great, thanks. I already tried something like it but never thought about restarting the timer afterwards, so this will help.

    About the tab key, it was supposed to be a virtual key in order to tab through the mailform, but, if possible it would be nicer to have an email script within AMS itself, so I'm looking at the smtp plugin now (only thing is I can't download it because it says server error). I already have the virtual keyboard ready and it puts the letters into Input1 correctly.
    Only thing is it doesn't show enters, I have this script in the virtual enter key (remember: this will be used on a touchscreen, so no keyboard is available)

    Code:
    Input.SetText("Input1", Input.GetText("Input1").."\r")
    Eventually the \r does work in the result of this page (underneath the Input1 field is a send button which collects data from Input1, puts it in a dialogbox (and it should email too, but I guess I can get this working with the smtp plugin) and clears the form).
    So \r gives enters in the result, but not on screen.
    Input1 has the multiple line function on and when I type with a real keyboard it does show the enters.
    I also like to have a backspace key in it, to correct errors.
    I think this is the last issue for now
    Last edited by irix; 10-15-2009 at 06:10 PM.

  7. #7
    Join Date
    Apr 2006
    Posts
    127
    Try sending ASCII chars for tab, backspace etc.

    e.g. BackSpace = String.Char(08);
    Tab = String.Char(09);

    You could also try inline escapes, i.e. if \r works the way you want then \b and \t should do so too.

  8. #8
    Join Date
    Oct 2009
    Posts
    35
    Quote Originally Posted by IdeasVacuum View Post
    Try sending ASCII chars for tab, backspace etc.

    e.g. BackSpace = String.Char(08);
    Tab = String.Char(09);

    You could also try inline escapes, i.e. if \r works the way you want then \b and \t should do so too.
    Code:
    Input.SetText("Input1", String.Char(08));
    Doesn't work, everythig gets ereased and it replaces it with a strange character. It should just remove one character.

    \b also gives this character, but clicking it again just adds that character again. It looks like a block with a small hole in it.

  9. #9
    Join Date
    Apr 2006
    Posts
    127
    ...you can't set the text directly in the input Object, process first, then set the result.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts