473,785 Members | 2,291 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

simulate a Users’ mouse actions

13 New Member
Hi,

Is there anyway to simulate a Users’ mouse actions using coldfusion? The goal is the automatically complete a series of online forms that have text boxes, drop down menus, links and Submit buttons. Thanks
Jan 2 '08
25 3930
chrissirhc
13 New Member
The Link I need to click is called "Select Documents From Your Online Catalog" located at the bottom of the code.


[HTML]<script language="JavaS cript">

function setActionFields (hiddenActionVa lue) {
document.forms[0].routingAction. value = hiddenActionVal ue;
}

</script>

<form name="splashFor m" method="post" action="/SplashRouterAct ion.do">
<!-- this needs to be called here because of the warning pop ups at the bottom of this page (ref bug #9976) -->
<script language="javas cript">
makeFormsRelati ve();
</script>
<input type="hidden" name="routingAc tion" value="">

<<a href="javascrip t:document.form s[0].submit()" class="subheade rblack1" onclick="setAct ionFields('star tCatalogOrder') ;">Select Documents From Your Online Catalog</a><br><span class="subheade rblack1">Select documents from your company's online catalog and send to FedEx Kinko's for printing.</span> </td>
</form>[/HTML]
Jan 6 '08 #11
acoder
16,027 Recognized Expert Moderator MVP
Since all the link does is submit the form, just make a HTTP request to the action page ("splashRouterA ction.do"). You will need to pass the hidden form field as a parameter using cfhttpparam. Set its value to "startCatalogOr der".
Jan 7 '08 #12
chrissirhc
13 New Member
Thanks for the clarity. Now the issue is when I use the secondary cfhttp request the site returns the login page. I added the username and password to the cfhttp statement but it did not work. Is this because the site is a https site?

!......My Code .....!

Expand|Select|Wrap|Line Numbers
  1. <cfhttp url="https://docstore.kinkos.com/tirekingdom/SplashRouterAction.do" username="mtfbwyswibltn" password="!Chrissirhc" method="post" resolveurl="yes" useragent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; FDM)" charset="utf-8">
  2.     <cfhttpparam type="formfield" name="keyword" value="startCatalogOrder">
  3. </cfhttp>
Jan 7 '08 #13
acoder
16,027 Recognized Expert Moderator MVP
I'm not sure if it would work if it's an https site.

It's about the session being maintained across pages to avoid login pages. Are all the pages from the same domain?
Jan 8 '08 #14
chrissirhc
13 New Member
Yes, all of the pages are on the same Domain.
Jan 9 '08 #15
acoder
16,027 Recognized Expert Moderator MVP
When I get a bit of time, I'll test this out to see if it can work.
Jan 9 '08 #16
chrissirhc
13 New Member
Thanks for your time.
Jan 9 '08 #17
acoder
16,027 Recognized Expert Moderator MVP
You're welcome.

In order to maintain session across cfhttp requests, you need to maintain the same cookies. To do that, you will need to parse the cookies out of the response header of the first cfhttp request result and use them as parameters in the rest of the requests. The values that you will need to pass will be CFID and CFTOKEN.
Jan 10 '08 #18
chrissirhc
13 New Member
I'll give it a shot. Thanks
Jan 10 '08 #19
acoder
16,027 Recognized Expert Moderator MVP
You might find this link useful. A bit more advanced than what you need, but it should give you a good idea about how to solve it.
Jan 11 '08 #20

Sign in to post your reply or Sign up for a free account.

Similar topics

1
12242
by: Michael J Whitmore | last post by:
Greetings, I have a very simple question. How do you simulate a user input to turn off a screen saver in Windows (either a mouse movement, mouse click, or keyboard input)? I promise I searched the newsgroup before asking :) I have written the following program that loads all my Webshots files into the Webshots photo manager, or so I thought. When you load the first it starts the screen saver. All other subsequent ones are not
0
1491
by: Mythran | last post by:
I'm trying to create a library that will 1.) Simulate an input device (IE: keyboard, mouse, joystick) and 2.) Capture data sent from an input device (IE: keyboard, mouse, joystick). The reason's for this are to be able to control (1) which will prevent specific (2) from being done. Effectively locking down operating systems in production environments. I do know that the different versions of MS Windows can lock themselves down to...
3
2297
by: Ryan Liu | last post by:
Can someone give a sample to prevent a row from being deleted in a datatable? I tried e.Row.RejectChanges(); in dt_RowDeleting() but seems does not work. I need verify if there other data using data in this row before actually remove it from datagrid. I can certainly control with Delete button. But if I want to allow the user to use Del key on the keyboard, I lost this kind control.
3
34827
by: madhuri.eerupula | last post by:
Hi. How to simulate(automatic) mouse movements and click operation using c#. Actually, i got pixels in the face (face tracking) right now and i need to move mouse(automatically, without using mouse manually) i.e., simulate mouse click operation using those pixels in c#. I think we can use robot() class in java , to achieve this, but how can we do this using c#. Hope you understand my problem and get bck to me asap. thanx bye
4
5495
by: Abhishek | last post by:
Hi, I have a activex web browser embedded in a windows form and on a click of a form button i need the mouse to go the position for example 100, 100 and click the link that will be there on that position. i am usind the win api setcursonpos to set the mouse position assume that the link will always be there at 100, 100. how do i get Windows to create the click event.
1
2223
by: diegocarpintero | last post by:
I am writing a c# class which main purpose is to simulate the dialog with a GUI-application. The idea is that this class can simulate some user actions like mouse clicks on buttons. I have found the following possibilities to simulate it: 1) Use SendInput Function (user32.dll) (unmanaged code) 2) Use System.Windows.Forms.SendKeys (managed code)
4
7516
by: flplini | last post by:
I want to ask how to use C++ to simulate the mouse control? ex:Let the mouse double-click the left key functions,thanks!
18
22117
by: eliss.carmine | last post by:
Is it possible to simulate a mouse click in the window I made (it's a Form), but not give it focus? I tried using WinAPI's mouseevent and SendMessage of WM_LBUTTONDOWN/WM_LBUTTONUP as suggested by the folks in #winapi on EFnet, but I think those require the window to have focus. Either that, or I'm doing something else wrong. The click actually seems to work once, and then stops working... I have no idea what is the problem actually....
5
30693
by: nuhfeken | last post by:
We have a C# winform that uses the MVP design pattern for the user interface. For reasons I'd rather not explain we need to simulate a right mouse click on a specific control to deactivate the control. I found code that almost does what we need. private static extern void mouse_event( UInt32 dwFlags, // motion and click options UInt32 dx, // horizontal position or change UInt32 dy, //...
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9947
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5379
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.