Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 3:48 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Emulate a mouse click on a vector object?
PostPosted: March 19th, 2007, 8:47 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Is there a way to send a virtual mouse-click onto another object (obj is not a Button)?

Here's what I'm trying to do.
I have 3 Vector Objects (polygons A, B, and C). Whenever one is clicked, its action sets off a different animation, and also changes a common variable. (I prefer to set up these simple actions without Scripting.)

Now what I want to do is have some other object and independent action (which will run "in the foreground"), but somewhere in that sequence embed and "send" a mouse-click over to Object B just as if the user clicked it so that its animation runs unseen in the background. I will use Scripts for these more complex animations.

Has anyone done something like this? Is there a Script function I missed?
Thanks.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: March 19th, 2007, 11:08 am 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
I'm not entirely sure what you are attempting to achieve, but one way would be to add a Variable Changed trigger to your Mouse Click trigger, so you have a MultiTrigger for the same events. If you set that changed trigger to a new variable, any time you change the value of that "flag" variable it will trigger the actions.

_________________
ddww Opus Developer


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 19th, 2007, 2:57 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

If I understand correctly what you are trying to achieve, I believe you may want to check out "custom triggers" and "custom actions" in the help guide. Without scripting (although I believe this can also be done by scripting), you can add a custom trigger along with your mouse clicks or other triggers to an action in one object, and then, by adding a custom action to another object, you can call the action attached to the custom trigger. (The new custom action calling the custom trigger also needs its own trigger, like a mouse click, in the new object.)

Take a look at the help guide regarding these and see if this helps.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject: Clearer -- More Clear
PostPosted: March 19th, 2007, 8:20 pm 
Offline

Joined: October 25th, 2004, 2:20 pm
Posts: 686
Location: Naperville, Illinois (USA)
Opus: 7.05
OS: Win XP SP3
System: P4 3.2GHz 1GB RAM 2-TB HDs + 4 more
1-2-3 --

Duncan, Stephen, and I (along with many people lurking on this forum) are having a hard time trying to understand what you are doing. I think Stephen is sending you in the right direction using Custom Trigger/Actions. That's primarily used so you don't have to repeat/maintain the same Actions over and over. You create it once (I usually do it in a Frame I call "Custom Actions") then use the Custom Trigger to activate the Action. NOTE: The name you create for your Custom Action is CASE SENSITIVE.

Sometimes (at least for me) if you re-write something to make it more clear for others -- the answer "pops" into your own head. We'd love to help you, but I've read your request several times, and I'm having problems understanding. Sorry.

_________________
Fred Harms, Extraordinary Demos
Naperville, Illinois (USA) 630/904-3636
demofred@aol.com


Top
 Profile Visit website  
 
 Post subject: WIP
PostPosted: March 20th, 2007, 12:21 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Okay. I'll look into the suggestions later and see if that works.

Fred... sure. I'll try to clean up the concept. I probably get myself ravelled after trying awhile to get a thing to work and also getting lost in script attempts.

Thanks. Back soon.

Larry

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject: Mostly solved
PostPosted: March 20th, 2007, 10:00 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Thanks Duncan, Stephen, and Fred.

I had lost sight of Multitrigger as I started getting into scripting some. Stephen and Duncan made the connection for me.

Nice thing about Opus... both suggestions seem like they will work. I have an example attached... working, but not refined. I used Custom-Trigger as I had missed the point of that before... seems good to learn it.

For others: This is a case of having animation actions attached to a set of graphical objects, triggered by mouse-click. But when I have the user on another part of the pub, I want one of those anim./actions initiated "as if" the user had clicked on the obj.


I welcome any improvements to the scripts or the approach.
-- Submit button does most of the work... probably is okay.
-- Script Object 3 on page is 'ugly'. Got to be a better way to handle which object is moved and which gets re-positioned to its starting point.
-- Later, most exercises I plan will give the user up to 5 choices... and for ratings, a scale of 1 to 7 at least. Should I use Arrays or what?

Thanks.


You do not have the required permissions to view the files attached to this post.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject: More questions
PostPosted: March 20th, 2007, 3:55 pm 
Offline

Joined: October 25th, 2004, 2:20 pm
Posts: 686
Location: Naperville, Illinois (USA)
Opus: 7.05
OS: Win XP SP3
System: P4 3.2GHz 1GB RAM 2-TB HDs + 4 more
Larry --

I use OPUS XE, so I can't remodel your example and return it to you because you wouldn't be able to open it. So I'll try to point out things that will make this much easier. This is not difficult. You have made it very complex because of the OPUS features you selected. For example:

1) Why put Text_11 in Frame_2? You can move a Text Object without having it in a Frame.

2) Why did you use an Animate-Move Action on Frame_2? You could have just had an On Show Transition of Scroll Page, and an On Hide Scroll Page would take it off.

3) Delete all the current code on your Submit Button. With a Left Mouse Click Trigger, first Hide all your Vectors, then use a Delay of .01, then Show All the Vectors. This will reset all the Vectors back to the initial position.

Now go to Programming and select the Select feature. In the Variable field, use the drop down and select your Polyclickalpah variable. Now go to Programming and select Case. Tick the "Value" and make it "1". Duplicate this three times and change them to "2", "3", and "4".

Go to each Vector's Actions and highlight the Move Horizontal/Vertical command. Change the Object definition from "This Object" to the specific Object (e.g. Vector_2). Now Copy that modified command. Before leaving, delete all the Actions except the Move one on each Vector. Reopen Actions on the Submit Button and do a Paste under the correct number (e.g. 1). Repeat this for each Vector.

4) You created Custom Triggers but no Custom Actions to match, so they don't do anything. In this solution, you don't need them.

Sorry I can't actually send you a completed example. If you are serious about using OPUS, I'd recommend upgrading to OPUS XE. You are obviously very intelligent. You are just confusing yourself by making this way more complicated than necessary.

I hope this helps. Email me privately if you have more questions.

_________________
Fred Harms, Extraordinary Demos
Naperville, Illinois (USA) 630/904-3636
demofred@aol.com


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 22nd, 2007, 8:10 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Fred,

Thanks. I'll be away for a few days and get back to Opus work towards the weekend... will look at alternative methods then.

As for Frames or not, I was thinking Multiframe for some layouts I have in mind. Also a big challenge ahead is figuring out how I will pull formatted text in... textboxes, docviewers, database fields (textbox and variable). I guess that will be a future question for the forum.

Later,
Larry

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 43 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group