Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | (REQUEST PINNING THIS ITEM IN THIS FORUM OR MOVED ELSEWHERE AS APPROPRIATE) Perhaps some of you are familiar with a popular shareware tool called " AutoIt". I have seen mention of it in these forums only for automating the Headshots database import. I have often considered using it to satisfy feature or plugin requests, and I have a feeling that there may be a bunch of useful scripts already out there. For those of you who are not familiar with AutoIt, basically it is a high-level scripting tool that not only allows you to "easily" (you have have some kind of programming aptitude) create your own GUI applications, but also interact with existing ones. For example, with AutoIt, you could recognize when certain DVDProfiler screens pop up, and send the screen keystrokes, capture some of the screen contents, fill in fields, start other programs such as Excel - the possibilities are limitless. AutoIt includes a little utility that dynamically shows the window name, text, object class and object ID under wherever you put the mouse pointer, so you can put the correct info into your script easily. I propose to establish this, or some other place where we can share and discuss useful scripts. This could augment plugins as way to do things that are not part of the base product. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
|
Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Here is my first sample. This little program attempts to load a filter set. It works only if the Collection List is already selected. Dim $ec, $filter ;Declare variables If $cmdline[0] == 0 Then $filter = "Default.flt" ;Check if running in debug mode If $cmdline[0] > 0 Then $filter = $cmdline[1] ;Check if running compiled WinActivate("Invelos Software DVD Profiler") ;Wait for DVD Profiler to show up WinWaitActive("Invelos Software DVD Profiler") ;Wait to become active Send("{F12}") ;Clear all filters ControlClick( "Invelos Software DVD Profiler", "", "TAdvGlowButton3") ; Load Filter Set WinActivate("Load Filter Set...") ;Activate Load Filter Set WinWaitActive("Load Filter Set...") ;Wait for active ControlCommand( "Load Filter Set...", "", 1152, "EditPaste",$filter) ;Put filter name in text field ControlClick ( "Load Filter Set...", "", "Button2") ;Press OK
Once compiled by AutoIt and saved as FilterSwitch.exe, you can execute the program from the command line like this: FilterSwitch filtername.flt If the filter and the program are in the same folder, it should work. Now, here is a small HTML program that makes buttons and calls the filterswitch. It does not run as an HTML section, because of Windows security, but you can run it in a browser window: <HTML> <HEAD> <body> <h1>Switch Filters</h1> <form> <INPUT TYPE="BUTTON" NAME="filter1" VALUE="Default Filter" OnClick="FilterClicked('default.flt')"><br><p> <INPUT TYPE="BUTTON" NAME="filter2" VALUE="Manual Profiles" OnClick="FilterClicked('manual.flt')"><br><p> <INPUT TYPE="BUTTON" NAME="filter3" VALUE="BluRay Profiles" OnClick="FilterClicked('bluray.flt')"><br><p> <INPUT TYPE="BUTTON" NAME="filter4" VALUE="HD Profiles" OnClick="FilterClicked('hd.flt')"><br><p> </form> <SCRIPT Language="JavaScript"> function FilterClicked(filter) { var path = "C:\\Users\\MediaDogg\\Desktop\\filters\\FilterSwitch.exe "+ filter; var WshShell = new ActiveXObject("WScript.Shell"); WshShell.Run("%comspec% /C " + path); } </SCRIPT> </body> </html>
And then here is what it looks like after I have pressed the "HD Profiles" button. Of course I had previously saved a filter called HD.flt, et. al., and put them in the same directory with the HTML file and FilterSwitch.exe. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
|