谁能提供一些操纵IE浏览器的资料?越多越好!

yvesliao 2014-02-19 11:29:13
写一个命令行程序,执行如下操作:
1、打开IE,加载某银行网址
2、模拟鼠标在用户名上点击,输入用户名,在密码框上点击,输入密码。(我在这一步停下来了,无法获取到密码框相对屏幕的坐标,所以没法模拟点击了)
3、点击登录按钮。

这样就实现了自动登录网银的操作了。分还有很多,不够再加!
...全文
306 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
liaoyungchun 2014-02-24
  • 打赏
  • 举报
回复
http://www.xuebuyuan.com/1007265.html 这篇文章把控制IE写得比较清楚。
赵4老师 2014-02-21
  • 打赏
  • 举报
回复
运行"C:\Program Files\AutoHotkey\AutoScriptWriter\AutoScriptWriter.exe",开始录制,手动操作一遍,结束录制。再参考生成的.ahk文件。
yvesliao 2014-02-21
  • 打赏
  • 举报
回复
引用 12 楼 zhao4zhong1 的回复:
理论上使用AutoHotkey可以将90%以上需要手动鼠标键盘操作完成的功能变成自动脚本运行来完成。
能给个DEMO吗?
yvesliao 2014-02-20
  • 打赏
  • 举报
回复
楼上的,我总感觉这个不合适,比如打开银行网址,自动输入账号密码,识别验证码并输入,登录后进入某菜单,抓取HTML,并分析表格中的数据,提交到web service,这么多内容autohotkey能合适么?除非你写个demo出来,要不然我辛苦研究多少天,最后发现不合适多浪费时间啊~~ 所以最好是用编程的方式操纵IE,c++或c#都行,提供资料即可。
赵4老师 2014-02-20
  • 打赏
  • 举报
回复
理论上使用AutoHotkey可以将90%以上需要手动鼠标键盘操作完成的功能变成自动脚本运行来完成。
zhuobattle 2014-02-20
  • 打赏
  • 举报
回复
输完用户名后,向IE浏览器发送tab消息试试看。让它把输入焦点放在密码框上,
赵4老师 2014-02-20
  • 打赏
  • 举报
回复
Seek -- by Phi: Navigating the Start Menu can be a hassle, especially if you have installed many programs over time. 'Seek' lets you specify a case-insensitive key word/phrase that it will use to filter only the matching programs and directories from the Start Menu, so that you can easily open your target program from a handful of matched entries. This eliminates the drudgery of searching and traversing the Start Menu. ToolTip Mouse Menu (requires XP/2k/NT) -- by Rajat: This script displays a popup menu in response to briefly holding down the middle mouse button. Select a menu item by left-clicking it. Cancel the menu by left-clicking outside of it. A recent improvement is that the contents of the menu can change depending on which type of window is active (Notepad and Word are used as examples here). Volume On-Screen-Display (OSD) -- by Rajat: This script assigns hotkeys of your choice to raise and lower the master and/or wave volume. Both volumes are displayed as different color bar graphs. Window Shading (roll up a window to its title bar) -- by Rajat: This script reduces a window to its title bar and then back to its original size by pressing a single hotkey. Any number of windows can be reduced in this fashion (the script remembers each). If the script exits for any reason, all "rolled up" windows will be automatically restored to their original heights. WinLIRC Client: This script receives notifications from WinLIRC whenever you press a button on your remote control. It can be used to automate Winamp, Windows Media Player, etc. It's easy to configure. For example, if WinLIRC recognizes a button named "VolUp" on your remote control, create a label named VolUp and beneath it use the command "SoundSet +5" to increase the soundcard's volume by 5%. 1 Hour Software -- by skrommel: This is a large collection of useful scripts, professionally presented with short descriptions and screenshots. Titan's Scripts: This collection includes useful scripts such as: 1) XML Reader/Writer: An easy interface to XML files to retrieve and write values, like JavaScript. 2) Anchor: Keeps GUI controls attached to the right or bottom edge of a resizable GUI window. 3) Functions: A collection of wrapper functions, one for each AutoHotkey command that has an OutputVar. 4) Weather: Displays the current weather in the tray menu or displays forecasts in a rich GUI. Toralf's Scripts: This collection includes useful scripts such as: 1) AHK Window Info: Reveals information on windows, controls, etc. 2) Electronic Program Guide: Browses the TV programs/schedules of your region (supports several countries). 3) Auto-Syntax-Tidy: Changes indentation and case of commands in a script to give it a consistent format/style. Sean's Scripts: Includes useful scripts such as: 1) Network Download/Upload Meter: Displays the network download/upload KB in a small, always-on-top progress bar. 2) StdoutToVar: Redirects the output of a command or application into one of the script's variables. 3) Capture a Screen Rectangle: A callable function that captures a portion of the screen and saves it as a file (BMP/JPG/PNG/GIF/TIF). It can also capture transparent windows and the mouse cursor. 4) Color Zoomer/Picker: Magnifies the area near the cursor, allowing a single pixel to be selected and its color identified. 5) Embed an Internet Explorer Control: Incorporate an MSIE control into a script's GUI window. The control can display a web page or other browser-compatible content. SKAN’s Tips N Tricks: Contains sample code and techniques for achieving useful effects and often-requested capabilities. Scripts & Functions Forum: This is a searchable collection of nearly 1000 ready-to-run scripts and functions. Built and maintained by AutoHotkey users, this archive grows and improves daily. -- Home --
赵4老师 2014-02-20
  • 打赏
  • 举报
回复
AutoHotkey Script Showcase -------------------------------------------------------------------------------- NiftyWindows -- by Enovatic-Solutions: This script gives you easy control of all basic window interactions such as dragging, resizing, maximizing, minimizing and closing. Its most powerful feature is activated by dragging with the right mouse button. Visualize each window divided into a virtual 9-cell grid with three columns and rows. The center cell is the largest one: you can grab and move a window around by clicking and holding it with the right mouse button. The other eight cells are used to resize a window in the same manner. NiftyWindows also offers snap-to-grid, "keep window aspect ratio", rolling up a window to its title bar, transparency control, and other useful shortcuts. Screen Magnifier -- by Holomind: This screen magnifier has the several advantages over the one included with the operating system, including: Customizable refresh interval and zoom level (including shrink/de-magnify); antialiasing to provide nicer output; and it is open-source (as a result, there are several variations to choose from, or you can tweak the script yourself). LiveWindows: Watch Dialog-boxes in Thumbnail -- by Holomind: This script allows you to monitor the progress of downloads, file-copying, and other dialogs by displaying a small replica of each dialog and its progress bar (dialogs are automatically detected, even if they're behind other windows). The preview window stays always-on-top but uses very little screen space (it can also be resized by dragging its edges). You can also monitor any window by dragging a selection rectangle around the area of interest (with control-shift-drag), then press Win+W to display that section in the preview window with real-time updates. Mouse Gestures -- by deguix: This script watches how you move the mouse whenever the right mouse button is being held down. If it sees you "draw" a recognized shape or symbol, it will launch a program or perform another custom action of your choice (just like hotkeys). See the included README file for how to define gestures. Context Sensitive Help in Any Editor -- by Rajat: This script makes Ctrl+2 (or another hotkey of your choice) show the help file page for the selected AutoHotkey command or keyword. If nothing is selected, the command name will be extracted from the beginning of the current line. Easy Window Dragging (requires XP/2k/NT): Normally, a window can only be dragged by clicking on its title bar. This script extends that so that any point inside a window can be dragged. To activate this mode, hold down CapsLock or the middle mouse button while clicking, then drag the window to a new position. Easy Window Dragging -- KDE style (requires XP/2k/NT) -- by Jonny: This script makes it much easier to move or resize a window: 1) Hold down the ALT key and LEFT-click anywhere inside a window to drag it to a new location; 2) Hold down ALT and RIGHT-click-drag anywhere inside a window to easily resize it; 3) Press ALT twice, but before releasing it the second time, left-click to minimize the window under the mouse cursor, right-click to maximize it, or middle-click to close it. Easy Access to Favorite Folders -- by Savage: When you click the middle mouse button while certain types of windows are active, this script displays a menu of your favorite folders. Upon selecting a favorite, the script will instantly switch to that folder within the active window. The following window types are supported: 1) Standard file-open or file-save dialogs; 2) Explorer windows; 3) Console (command prompt) windows. The menu can also be optionally shown for unsupported window types, in which case the chosen favorite will be opened as a new Explorer window. IntelliSense -- by Rajat (requires XP/2k/NT): This script watches while you edit an AutoHotkey script. When it sees you type a command followed by a comma or space, it displays that command's parameter list to guide you. In addition, you can press Ctrl+F1 (or another hotkey of your choice) to display that command's page in the help file. To dismiss the parameter list, press Escape or Enter. Using a Joystick as a Mouse: This script converts a joystick into a three-button mouse. It allows each button to drag just like a mouse button and it uses virtually no CPU time. Also, it will move the cursor faster depending on how far you push the joystick from center. You can personalize various settings at the top of the script. Joystick Test Script: This script helps determine the button numbers and other attributes of your joystick. It might also reveal if your joystick is in need of calibration; that is, whether the range of motion of each of its axes is from 0 to 100 percent as it should be. If calibration is needed, use the operating system's control panel or the software that came with your joystick. On-Screen Keyboard (requires XP/2k/NT) -- by Jon: This script creates a mock keyboard at the bottom of your screen that shows the keys you are pressing in real time. I made it to help me to learn to touch-type (to get used to not looking at the keyboard). The size of the on-screen keyboard can be customized at the top of the script. Also, you can double-click the tray icon to show or hide the keyboard. Minimize Window to Tray Menu: This script assigns a hotkey of your choice to hide any window so that it becomes an entry at the bottom of the script's tray menu. Hidden windows can then be unhidden individually or all at once by selecting the corresponding item on the menu. If the script exits for any reason, all the windows that it hid will be unhidden automatically. Changing MsgBox's Button Names: This is a working example script that uses a timer to change the names of the buttons in a MsgBox dialog. Although the button names are changed, the IfMsgBox command still requires that the buttons be referred to by their original names. Numpad 000 Key: This example script makes the special 000 key that appears on certain keypads into an equals key. You can change the action by replacing the “Send, =” line with line(s) of your choice. Using Keyboard Numpad as a Mouse -- by deguix: This script makes mousing with your keyboard almost as easy as using a real mouse (maybe even easier for some tasks). It supports up to five mouse buttons and the turning of the mouse wheel. It also features customizable movement speed, acceleration, and "axis inversion".
赵4老师 2014-02-20
  • 打赏
  • 举报
回复
Version 1.0.48.05 www.autohotkey.com ©2003-2009 Chris Mallett, portions ©AutoIt Team Introduction AutoHotkey is a free, open-source utility for Windows. With it, you can: Automate almost anything by sending keystrokes and mouse clicks. You can write macros by hand or use the macro recorder. Create hotkeys for keyboard, joystick, and mouse. Virtually any key, button, or combination can become a hotkey. Expand abbreviations as you type them. For example, typing "btw" can automatically produce "by the way". Create custom data-entry forms, user interfaces, and menu bars. See GUI for details. Remap keys and buttons on your keyboard, joystick, and mouse. Respond to signals from hand-held remote controls via the WinLIRC client script. Run existing AutoIt v2 scripts and enhance them with new capabilities. Convert any script into an EXE file that can be run on computers that don't have AutoHotkey installed. Getting started might be easier than you think. Check out the quick-start tutorial. More about Hotkeys AutoHotkey unleashes the full potential of your keyboard, joystick, and mouse. For example, in addition to the typical Control, Alt, and Shift modifiers, you can use the Windows key and the Capslock key as modifiers. In fact, you can make any key or mouse button act as a modifier. For these and other capabilities, see Advanced Hotkeys. Other Features Change the volume, mute, and other settings of any soundcard. Make any window transparent, always-on-top, or alter its shape. Use a joystick or keyboard as a mouse. Monitor your system. For example, close unwanted windows the moment they appear. Retrieve and change the clipboard's contents, including file names copied from an Explorer window. Disable or override Windows' own shortcut keys such as Win+E and Win+R. Alleviate RSI with substitutes for Alt-Tab (using keys, mouse wheel, or buttons). Customize the tray icon menu with your own icon, tooltip, menu items, and submenus. Display dialog boxes, tooltips, balloon tips, and popup menus to interact with the user. Perform scripted actions in response to system shutdown or logoff. Detect how long the user has been idle. For example, run CPU intensive tasks only when the user is away. Automate game actions by detecting images and pixel colors (this is intended for legitimate uses such as the alleviation of RSI). Read, write, and parse text files more easily than in other languages. Perform operation(s) upon a set of files that match a wildcard pattern. Work with the registry and INI files. Software License: GNU General Public License Acknowledgements A special thanks to Jonathan Bennett, whose generosity in releasing AutoIt v2 as free software in 1999 served as an inspiration and time-saver for myself and many others worldwide. In addition, many of AutoHotkey's enhancements to the AutoIt v2 command set, as well as the Window Spy and the script compiler, were adapted directly from the AutoIt v3 source code. So thanks to Jon and the other AutoIt authors for those as well. Finally, AutoHotkey would not be what it is today without these other individuals.
SKATE11 2014-02-19
  • 打赏
  • 举报
回复
360抢票王可以
赵4老师 2014-02-19
  • 打赏
  • 举报
回复
Remarks ImageSearch can be used to detect graphical objects on the screen that either lack text or whose text cannot be easily retrieved. For example, it can be used to discover the position of picture buttons, icons, web page links, or game objects. Once located, such objects can be clicked via Click. A strategy that is sometimes useful is to search for a small clipping from an image rather than the entire image. This can improve reliability in cases where the image as a whole varies, but certain parts within it are always the same. One way to extract a clipping is to: Press Alt+PrintScreen while the image is visible in the active window. This places a screenshot on the clipboard. Open an image processing program such as Paint. Paste the contents of the clipboard (that is, the screenshot). Select a region that does not vary and that is unique to the image. Copy and paste that region to a new image document. Save it as a small file for use with ImageSearch. To be a match, an image on the screen must be the same size as the one loaded via the ImageFile parameter and its options. The region to be searched must be visible; in other words, it is not possible to search a region of a window hidden behind another window. By contrast, images that lie partially beneath the mouse cursor can usually be detected. The exception to this is game cursors, which in most cases will obstruct any images beneath them. Since the search starts at the top row of the region and moves downward, if there is more than one match, the one closest to the top will be found. Icons containing a transparent color automatically allow that color to match any color on the screen. Therefore, the color of what lies behind the icon does not matter. ImageSearch supports 8-bit color screens (256-color) or higher. The search behavior may vary depending on the display adapter's color depth (especially for GIF and JPG files). Therefore, if a script will run under multiple color depths, it is best to test it on each depth setting. You can use the shades-of-variation option (*n) to help make the behavior consistent across multiple color depths. If the image on the screen is translucent, ImageSearch will probably fail to find it. To work around this, try the shades-of-variation option (*n) or make the window temporarily opaque via WinSet, Transparent, Off.
赵4老师 2014-02-19
  • 打赏
  • 举报
回复
引用 4 楼 yvesliao 的回复:
[quote=引用 3 楼 zhao4zhong1 的回复:] http://bbs.csdn.net/topics/390705388
这个也是我发的帖啊,就是那个帖子没解决,所以把要求降低了,你说的AutoHotKey不行,因为必须登录进去取得HTML进行采集啊[/quote] 以下内容来自autohotkey联机帮助:
ImageSearch

--------------------------------------------------------------------------------

Searches a region of the screen for an image.

ImageSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ImageFile

Parameters
OutputVarX/Y The names of the variables in which to store the X and Y coordinates of the upper-left pixel of where the image was found on the screen (if no match is found, the variables are made blank). Coordinates are relative to the active window unless CoordMode was used to change that.

Either or both of these parameters may be left blank, in which case ErrorLevel (see below) can be used to determine whether a match was found.
 
X1,Y1 The X and Y coordinates of the upper left corner of the rectangle to search, which can be expressions. Coordinates are relative to the active window unless CoordMode was used to change that. 
X2,Y2 The X and Y coordinates of the lower right corner of the rectangle to search, which can be expressions. Coordinates are relative to the active window unless CoordMode was used to change that. 
ImageFile The file name of an image, which is assumed to be in %A_WorkingDir% if an absolute path isn't specified. All operating systems support GIF, JPG, BMP, ICO, CUR, and ANI images (BMP images must be 16-bit or higher). Other sources of icons include the following types of files: EXE, DLL, CPL, SCR, and other types that contain icon resources. On Windows XP or later, additional image formats such as PNG, TIF, Exif, WMF, and EMF are supported. Operating systems older than XP can be given support by copying Microsoft's free GDI+ DLL into the AutoHotkey.exe folder (but in the case of a compiled script, copy the DLL into the script's folder). To download the DLL, search for the following phrase at www.microsoft.com: gdi redistributable

Options: Zero or more of the following strings may be also be present immediately before the name of the file. Separate each option from the next with a single space or tab. For example: *2 *w100 *h-1 C:\Main Logo.bmp

*IconN: To use an icon group other than the first one in the file, specify *Icon followed immediately by the number of the group. For example, *Icon2 would load the default icon from the second icon group.

*n (variation): Specify for n a number between 0 and 255 (inclusive) to indicate the allowed number of shades of variation in either direction for the intensity of the red, green, and blue components of each pixel's color. For example, *2 would allow two shades of variation. This parameter is helpful if the coloring of the image varies slightly or if ImageFile uses a format such as GIF or JPG that does not accurately represent an image on the screen. If you specify 255 shades of variation, all colors will match. The default is 0 shades.

*TransN: This option makes it easier to find a match by specifying one color within the image that will match any color on the screen. It is most commonly used to find PNG, GIF, and TIF files that have some transparent areas (however, icons do not need this option because their transparency is automatically supported). For GIF files, *TransWhite might be most likely to work. For PNG and TIF files, *TransBlack might be best. Otherwise, specify for N some other color name or RGB value (see the color chart for guidance, or use PixelGetColor in its RGB mode). Examples: *TransBlack, *TransFFFFAA, *Trans0xFFFFAA

*wn and *hn: Width and height to which to scale the image (this width and height also determines which icon to load from a multi-icon .ICO file). If both these options are omitted, icons loaded from ICO, DLL, or EXE files are scaled to the system's default small-icon size, which is usually 16 by 16 (you can force the actual/internal size to be used by specifying *w0 *h0). Images that are not icons are loaded at their actual size. To shrink or enlarge the image while preserving its aspect ratio, specify -1 for one of the dimensions and a positive number for the other. For example, specifying *w200 *h-1 would make the image 200 pixels wide and cause its height to be set automatically.
 
Examples ImageSearch, FoundX, FoundY, 40,40, 300, 300, C:\My Images\test.bmp CoordMode Pixel ; Interprets the coordinates below as relative to the screen rather than the active window. ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *Icon3 %A_ProgramFiles%\SomeApp\SomeApp.exe if ErrorLevel = 2 MsgBox Could not conduct the search. else if ErrorLevel = 1 MsgBox Icon could not be found on the screen. else MsgBox The icon was found at %FoundX%x%FoundY%.
yvesliao 2014-02-19
  • 打赏
  • 举报
回复
引用 3 楼 zhao4zhong1 的回复:
http://bbs.csdn.net/topics/390705388
这个也是我发的帖啊,就是那个帖子没解决,所以把要求降低了,你说的AutoHotKey不行,因为必须登录进去取得HTML进行采集啊
赵4老师 2014-02-19
  • 打赏
  • 举报
回复
yvesliao 2014-02-19
  • 打赏
  • 举报
回复
引用 1 楼 SKATE11 的回复:
360抢票王可以
我说的是自己写代码,登录进去还有抓取数据的操作呢,这只是第一步。

3,881

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 其它技术问题
社区管理员
  • 其它技术问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧