rybruce Posted December 16, 2014 Posted December 16, 2014 Hello, First let me say I am not a programmer - just a business owner trying to find a way to speed up a very repetitive task. So forgive me if I use the wrong descriptions, words, jargon etc. I am on a PC with Windows 7 trying to use AU3Record 3.3 to paste values from excel into an engineering program called RISA 3D. However, the recorder will not record any mouse or keyboard movements in that program. I successfully did some practice runs using several other programs like AutoCAD, PhotoShop, Word, and another engineering program called TEDDS. In all those other programs, the entire macro records perfectly and I can run it subsequently with success. When I start record, I can see the script being recorded as I work in excel. When I move the mouse to RISA it simply stops scripting even though the recorder is still active. When I move back to excel or any other program, it resumes scripting. I do know that RISA 3D does not offer an API. Is it possible they wrote the program in a way that this sort of macro recorder can't be used? If this is something a non-technical person like me can fix, please write your answer in layman's terms. If not, you can make your questions and/or suggestions as technical as you want, as I have a programmer friend I could call in to help if it gets over my head.
iamtheky Posted December 16, 2014 Posted December 16, 2014 (edited) use the autoit window info tool, drop the cross hairs on some stuff in RISA 3D, post the contents of the summary tab. Autoit certainly does not play nice with some stuff, but if the window info tool returns controls it may avoid the need to send keystrokes and cross your fingers. Edited December 16, 2014 by boththose ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
rybruce Posted December 16, 2014 Author Posted December 16, 2014 use the autoit window info tool, drop the cross hairs on some stuff in RISA 3D, post the contents of the summary tab. Autoit certainly does not play nice with some stuff, but if the window info tool returns controls it may avoid the need to send keystrokes and cross your fingers. Like this? >>>> Window <<<< Title: Results Class: #32770 Position: 1746, 132 Size: 152, 362 Style: 0x94C800C4 ExStyle: 0x00010181 Handle: 0x00000000004A0D26 >>>> Control <<<< Class: Button Instance: 4 ClassnameNN: Button4 Name: Advanced (Class): [CLASS:Button; INSTANCE:4] ID: 760 Text: Member Forces Position: 1, 50 Size: 144, 16 ControlClick Coords: 66, 10 Style: 0x50018000 ExStyle: 0x00000000 Handle: 0x0000000000180BA6 >>>> Mouse <<<< Position: 1816, 213 Cursor ID: 0 Color: 0xF0F0F0 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< Joint Reactions Joint Deflections Story Drift Member Forces Member Stresses Member Torsion Member Deflections Suggested Design Design Results Seismic Detailing Concrete Reinforcing Plate Stresses Plate Forces Plate Corner Forces Solid Stresses Solid Principals Wall Panel Design Material TakeOff Frequencies Mode Shapes Connection Results >>>> Hidden Text <<<<
Moderators JLogan3o13 Posted December 16, 2014 Moderators Posted December 16, 2014 Yes, like that. What is the output if you hover over the input field where you want to paste the information? What you have above is the info for a button. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
iamtheky Posted December 16, 2014 Posted December 16, 2014 indeed, do as JLogan suggests, you will soon be having all sorts of fun with controls while you are learning you can also take a stab at clicking that button [CLASS:Button; INSTANCE:4] https://www.autoitscript.com/autoit3/docs/functions/ControlClick.htm ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
rybruce Posted December 16, 2014 Author Posted December 16, 2014 Yes, like that. What is the output if you hover over the input field where you want to paste the information? What you have above is the info for a button. Here is what I get in the field where I want to paste the first block of data: >>>> Window <<<< Title: RISA-3D - [R:EngineeringRISA Frame Analysis TemplatesRoofScreenFrame Table WIPSCSC3BVerticalSC3BV.r3d] Class: RISAMainWin Position: 211, 38 Size: 1379, 921 Style: 0x14CF0000 ExStyle: 0x00000100 Handle: 0x00000000002B0876 >>>> Control <<<< Class: Edit Instance: 1 ClassnameNN: Edit1 Name: Advanced (Class): [CLASS:Edit; INSTANCE:1] ID: 320 Text: Position: 636, 167 Size: 99, 17 ControlClick Coords: 27, 7 Style: 0x50000080 ExStyle: 0x00000000 Handle: 0x0000000000B00BB0 >>>> Mouse <<<< Position: 882, 262 Cursor ID: 0 Color: 0x00FF00 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< Joint Label Joint Coordinates and Temperatures N1 Model View >>>> Hidden Text <<<<
Moderators JLogan3o13 Posted December 16, 2014 Moderators Posted December 16, 2014 (edited) Try this with the window open: ControlSend("[CLASS:RISAMainWin]", "", "Edit1", "Test") Edited December 16, 2014 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
rybruce Posted December 16, 2014 Author Posted December 16, 2014 Try this with the window open: ControlSend("[CLASS:RISAMainWin]", "", "Edit1", "Test") Sorry man, I think this is getting over my head quickly. I don't even know what you mean to "try this with the window open". I don't want to waste your time so maybe I need to get my programmer friend in here - I'm sure he'd understand what you are talking about. It sounds like it can be done though, as long as we can write some lines of code?
iamtheky Posted December 17, 2014 Posted December 17, 2014 (edited) I think this is getting over my head quickly Dont give up, we can have you automating your own stuff fairly quickly if you continue as you have. Open RISA-3D as you had it when you dropped the crosshairs on the input field. take one of the scripts the macro wrote, delete everything, paste that one line of code, and run it (F5). If everything goes as expected it will write the word "Test" in the edit control Edited December 17, 2014 by boththose ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
rybruce Posted December 17, 2014 Author Posted December 17, 2014 Dont give up, we can have you automating your own stuff fairly quickly if you continue as you have. Open RISA-3D as you had it when you dropped the crosshairs on the input field. take one of the scripts the macro wrote, delete everything, paste that one line of code, and run it (F5). If everything goes as expected it will write the word "Test" in the edit control Thanks. Okay when I did that, nothing happened in RISA but i got the following in the editor lower window. >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:UsersrbruceDesktoptest.au3" /UserParams +>16:17:27 Starting AutoIt3Wrapper v.14.801.2025.0 SciTE v.3.4.4.0 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0409) +> SciTEDir => C:Program Files (x86)AutoIt3SciTE UserDir => C:UsersrbruceAppDataLocalAutoIt v3SciTEAutoIt3Wrapper SCITE_USERHOME => C:UsersrbruceAppDataLocalAutoIt v3SciTE >Running AU3Check (3.3.12.0) from:C:Program Files (x86)AutoIt3 input:C:UsersrbruceDesktoptest.au3 +>16:17:27 AU3Check ended.rc:0 >Running:(3.3.12.0):C:Program Files (x86)AutoIt3autoit3.exe "C:UsersrbruceDesktoptest.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop +>16:17:28 AutoIt3.exe ended.rc:0 +>16:17:28 AutoIt3Wrapper Finished. >Exit code: 0 Time: 0.4731
iamtheky Posted December 17, 2014 Posted December 17, 2014 maybe you can pull it off like the example for controlsend? Local $hWnd = WinWait("[CLASS:RISAMainWin]", "", 10) ControlSend($hWnd, "", "Edit1", "This is some text") There is enough info coming back from autoit window info that your wants can no doubt be pulled off. And remember the smart kids in Europe wake up in 5 hours. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now