Can I take Ans(1), Ans(2), and Ans(3) and store them in another variable?

Can I do this:

Code:
:sum(6,Y,P)
:Ans(3)→P
(1) For the fifth time, stop adding useless polls to your topic
(2) For about the fourth time, stop double-posting
(3) Did you read the readme? Do you know how to use Ans? You can store Ans(3) to something else, but that will also immediately replace Ans.
I'm sorry for the first two, I will do my best to stop that.

So here is what I gathered;
Syntax:
Code:
sum(6,The_starting_X_of_the_mouse,The_starting_Y_of_the_mouse)


The ending X output is stored in Ans(1), the ending Y output is stored in Ans(2), and the click is stored in Ans(3).

Is this correct?
Yes, because Ans is a three-element list. As stated on the DCS Wiki page for SimpleGUIMouse:

Quote:
This routine returns a 3-element list [in Ans] in the form {X,Y,CLICK}.
Ah, poor fellow: I had trouble with SimpleMouse too. But I believe you have it now. My usage was like: If Ans(1)>1 and Ans(1)<20 and Ans(2)>1 and Ans(2)<30:Then:Goto X. That long statement per hotspot, with the numbers used here as examples. Hope that helps, though that example is for clickable hotspots. And you can store Ans(x) into variables - in this example, X and Y would make sense - and it may make your life simpler...
Why not just use the Doors CS GUI API's built-in ability to handle hotspots for you, and not just use the SimpleGUIMouse? Sad That would have been a much easier solution to your problem.
KermMartian wrote:
Why not just use the Doors CS GUI API's built-in ability to handle hotspots for you, and not just use the SimpleGUIMouse? Sad That would have been a much easier solution to your problem.


Ah, well, that in reference to willwac's problem, and his using SimpleMouse. Personally, I do use the official GUIMouse, along with all of the other GUI routines! And, depending on what you want to do, willwac, that may be the right choice for you too.
Yes, I should do that, but I haven't looked into that.
Could you put more examples in the DCS Wiki, as well as inputs, and outputs?

P.S. CalebHansberry; I'd survive 32 days in a creeper apocalypse!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement