Example of output generated by 'AllMacros' ----------------------------------------------- Owner handle:"MoveX"(file: MacroSamples.txt) <|'1'|0| //////////////////////////////////////////////////////////////// // Description: - select all, move delta x = 1. // // Requirements: - default configuration of editbars. // // Shortcut key: - '1'. // // Selector state: no selection (0). // //////////////////////////////////////////////////////////////// VK_CONTROL, 'A', VK_CONTROL, // Ctrl-A (select all) VK_TAB(10), // Go to editbar 'Delta X' '1', VK_RETURN, // Write '1', press 'Enter' VK_ESCAPE // ESC - deselect |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'2'|0| //////////////////////////////////////////////////////////////// // Description: - open (or activate) TCW file Sample.tcw. // // Requirements: - // // Shortcut key: - '2'. // // Selector state: no selection (0). // //////////////////////////////////////////////////////////////// VK_MENU, 'F', 'O', VK_MENU, Sleep(900), // File open dialog VK_CONTROL, 'A', VK_CONTROL, VK_DELETE, // Ctrl-A, Del - clear string Str(ProfilesPath), Str("Macros\Samples\Sample.tcw"), // Enter path to drawing VK_RETURN |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'3'|0| //////////////////////////////////////////////////////////////// // Description: - save drawing as .bmp // // use data/time in file name. // // Requirements: - mshta.exe available in OS // // Shortcut key: - '3'. // // Selector state: no selection (0). // //////////////////////////////////////////////////////////////// VK_LWIN, 'R', VK_LWIN, Sleep(100), // Open 'Run' dialog Str("mshta "), '"', Str("javascript: // Build mshta command line window.moveTo(-5000,-5000); // Hide mshta window window.resizeTo(1,1); var d=new Date(); // Generate data/time string // as "Drawing1 (Tuesday, July 28, 2015 11.25.32 PM).bmp" clipboardData.setData('text', // Copy the string to clipboard ' (' + d.toLocaleString().replace(/:/g, '.') + ')'); close(); // close mhta "),'"', VK_RETURN,Sleep(200), // Press 'Enter' SetFocus, Sleep(200), // Return focus to TC VK_MENU, 'F', 'A', VK_MENU, Sleep(500), // Alt-F, Alt-A VK_END, VK_BACK(4), // Delete extension '.tcw' VK_CONTROL, 'V', Sleep(100),VK_CONTROL, // Ctrl - V VK_TAB, Str("b"), VK_RETURN, // Select 'BMP' filter VK_RETURN // Press 'Enter' |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'4'|0| //////////////////////////////////////////////////////////////// // Description: - select by type (Line). // // Requirements: - lines in drawing. // // Shortcut key: - '4'. // // Selector state: no selection (0). // //////////////////////////////////////////////////////////////// VK_CONTROL, 'T', VK_CONTROL, // Ctrl-T (Select by Entity Type) VK_TAB(3), // Go to list Str("line"), // Select option 'Line' VK_RETURN // Press 'Enter' |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'5'|0| //////////////////////////////////////////////////////////////// // Description: - Create screenshot and copy to mspaint. // // Requirements: - MS Paint available in OS. // // Shortcut key: - '5'. // // Selector state: no selection (0). // //////////////////////////////////////////////////////////////// VK_MENU, VK_SNAPSHOT, VK_MENU, // Alt-Print Screen Sleep(500), VK_LWIN, 'R', VK_LWIN, Sleep(100), // Open 'Run' dialog Str("mspaint"), VK_RETURN, // Run MS Paint Sleep(500), VK_CONTROL, 'V', VK_CONTROL // Ctrl - V |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'6'|0| //////////////////////////////////////////////////////////////// // Description: - "Hello world!" in MS Word. // // Requirements: - MS Word available in OS. // // Shortcut key: - '6'. // // Selector state: no selection (0). // //////////////////////////////////////////////////////////////// VK_LWIN, 'R', VK_LWIN, Sleep(100), // Open 'Run' dialog Str("winword"), VK_RETURN, // Run MS Word Sleep(1000), Str("Hello world!") // Write "Hello world!" |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'7'|0| //////////////////////////////////////////////////////////////// // Description: - "Hello world!" in Notepad. // // Requirements: - Notepad available in OS. // // Shortcut key: - '7'. // // Selector state: no selection (0). // //////////////////////////////////////////////////////////////// VK_LWIN, 'R', VK_LWIN, Sleep(100), // Open 'Run' dialog Str("notepad"), VK_RETURN, // Run Notepad Sleep(500), Str("Hello world!") // Write "Hello world!" |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'8'|0| ////////////////////////////////////////////////////////////////////// // Description: - Local menu 'Selector 3D properties'. // // Requirements: - // // Shortcut key: - '8'. // // Selector state: no selection (0). // // Notes: // // - Uncomment one of the macros to using. // // - Full list of menu IDs can be obtained with the command // // CopyToClipboard(LocalMenuItems). See sample 'Generate reports'.// ////////////////////////////////////////////////////////////////////// LocalMenuExec(107) // 107 - Open the 3D selector properties dialog // Uncomment one of lines to use command // //LocalMenuExec(100) // 100 - Switch between the 2D/3D Dimension mode //LocalMenuExec(106) // 106 - Open the 2D selector properties dialog |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'1'|1| //////////////////////////////////////////////////////////////// // Description: - Activate handle. // // Requirements: - // // Shortcut key: - '1'. // // Selector state: has selection (1). // //////////////////////////////////////////////////////////////// ActivateHandle |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'2'|1| //////////////////////////////////////////////////////////////// // Description: - Activate handle. // // Requirements: - // // Shortcut key: - '2'. // // Selector state: has selection (1). // //////////////////////////////////////////////////////////////// ActivateHandleByName("MoveZ") // Activate handle 'MoveZ' |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'3'|1| ///////////////////////////////////////////////////////////////// // Description: - Activate handle 'MoveX', move X = 1. // // Requirements: - default configuration of editbars. // // Shortcut key: - '3'. // // Selector state: has selection (1). // ///////////////////////////////////////////////////////////////// ActivateHandleByName("MoveX"), // Activate handle 'MoveX' VK_TAB(10), // Go to editbar 'Delta X' '1', // Write '1', VK_RETURN // Press 'Enter' |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'4'|1| ///////////////////////////////////////////////////////////////// // Description: - Scale *2 using MS Calculator. // // Requirements: - MS Calculator available in OS, // // default configuration of editbars. // // Shortcut key: - '4'. // // Selector state: has selection (1). // ///////////////////////////////////////////////////////////////// VK_TAB, // Go to editbar 'Scale X' VK_CONTROL, 'C', Sleep(100), VK_CONTROL, // Ctrl-C (copy editbar value) VK_LWIN, 'R', VK_LWIN, Sleep(100), // Open 'Run' dialog Str("calc"), Sleep(1), VK_RETURN, Sleep(500), // Run MS Calculator (calc.exe) VK_CONTROL, 'V', Sleep(100), VK_CONTROL, // Ctrl-V VK_MULTIPLY, Str("2="), // Write '*2=' VK_CONTROL, 'C', Sleep(100), VK_CONTROL, // Ctrl-C VK_MENU, VK_F4, VK_MENU, Sleep(100), // Close calc.exe SetFocus, Sleep(100), // Return focus to TC VK_TAB, // Go to editbar 'Scale X' VK_CONTROL, 'V', Sleep(100), VK_CONTROL, // Ctrl-V VK_TAB, // Go to editbar 'Scale Y' VK_CONTROL, 'V', Sleep(100), VK_CONTROL, // Ctrl-V VK_TAB, // Go to editbar 'Scale Z' VK_CONTROL, 'V', Sleep(100), VK_CONTROL, // Ctrl-V VK_RETURN |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'5'|1| ///////////////////////////////////////////////////////////////// // Description: - Scale *0.5 using javascript. // // Requirements: - mshta.exe available in OS, // // default configuration of editbars. // // Shortcut key: - '5'. // // Selector state: has selection (1). // ///////////////////////////////////////////////////////////////// VK_TAB, // Go to editbar 'Scale X' VK_CONTROL, 'C', Sleep(100), VK_CONTROL, // Ctrl-C (copy editbar value) VK_LWIN, 'R', VK_LWIN, // Open 'Run' dialog Sleep(100), Str("mshta "), '"', Str("javascript: // Build mshta command line window.moveTo(-5000,-5000); // Hide mshta window window.resizeTo(1,1); var s=0.5*parseFloat(clipboardData.getData('text')); clipboardData.setData('text',s.toString()); // Copy the string to clipboard close(); // close mhta "),'"', VK_RETURN,Sleep(500), SetFocus, Sleep(100), // Return focus to TC VK_TAB, // Go to editbar 'Scale X' VK_CONTROL, 'V', Sleep(100), VK_CONTROL, // Ctrl-V VK_TAB, // Go to editbar 'Scale Y' VK_CONTROL, 'V', Sleep(100), VK_CONTROL, // Ctrl-V VK_TAB, // Go to editbar 'Scale Z' VK_CONTROL, 'V', Sleep(100), VK_CONTROL, // Ctrl-V VK_RETURN |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'6'|1| ////////////////////////////////////////////////////////////////////// // Description: - Local menu 'Switch between the 2D/3D'. // // Requirements: - // // Shortcut key: - '6'. // // Selector state: has selection (1). // // Notes: // // - Full list of menu IDs can be obtained with the command // // CopyToClipboard(LocalMenuItems). See sample 'Generate reports'.// ////////////////////////////////////////////////////////////////////// LocalMenuExec(100) // 100 - Switch between the 2D/3D Dimension mode |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'7'|1| //////////////////////////////////////////////////////////////// // Description: - Set orientation. // // Requirements: - default configuration of editbars, // // selector extents by Entity CS. // // Shortcut key: - '7'. // // Selector state: has selection (1). // //////////////////////////////////////////////////////////////// VK_TAB(13), // Go to editbar 'Angle X' '0', VK_TAB, // Go to editbar 'Angle Y' '0', VK_TAB, // Go to editbar 'Angle Z' '0', VK_RETURN |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'8'|1| ///////////////////////////////////////////////////////////////// // Description: - Generate report, using ShowText.hta // // Requirements: - mshta.exe available in OS. // // // // Shortcut key: - '8'. // // Selector state: has selection (1). // ///////////////////////////////////////////////////////////////// //CopyToClipboard(VirtualKeyCodes), // Uncomment one of lines to use command // //CopyToClipboard(ActiveDrawingPath), //CopyToClipboard(ActiveDrawingName), //CopyToClipboard(ProfilesPath), //CopyToClipboard(ProfilesPathForwardSlash), //CopyToClipboard(LocalMenuItems), // Selector local menu //CopyToClipboard(AllHandles), //CopyToClipboard(SelectedGraphics), //CopyToClipboard(SelectedGraphicsVert), CopyToClipboard(AllMacros), VK_LWIN, 'R', VK_LWIN, Sleep(100), // Open 'Run' dialog Str(ProfilesPath), Str("Macros\ShowText.hta"), VK_RETURN |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'9'|1| //////////////////////////////////////////////////////////////// // Description: - Open existing .XLSX file. // // Requirements: - MS Excel available in OS, // // mshta.exe available in OS. // // Shortcut key: - '9'. // // Selector state: has selection (1). // //////////////////////////////////////////////////////////////// VK_LWIN, 'R', VK_LWIN, // Open 'Run' dialog Sleep(100), Str("mshta "), '"', Str("javascript: // Build mshta command line moveTo(-5000,-5000); // Hide mshta window resizeTo(1,1); var o = new ActiveXObject('Excel.Application'); o.Visible = true; o.Workbooks.Open('"), Str(ProfilesPathForwardSlash), Str("Macros/Samples/1.xlsx');"), // Enter path to .xlsx file Str("close();"), // close mhta '"', VK_RETURN |> Owner handle:"MoveX"(file: MacroSamples.txt) <|'0'|1| //////////////////////////////////////////////////////////////// // Description: - Create Excel file and add Charts. // // Requirements: - MS Excel available in OS, // // mshta.exe available in OS. // // Shortcut key: - '0'. // // Selector state: has selection (1). // //////////////////////////////////////////////////////////////// VK_LWIN, 'R', VK_LWIN, // Open 'Run' dialog Sleep(100), Str("mshta "), '"', Str("javascript: // Build mshta command line resizeTo(1,1); // Hide mshta window var o=new ActiveXObject('Excel.Application'); o.Workbooks.Add; o.Visible = true; o.Cells(1,1).Value=5; o.Cells(1,2).Value=10; o.Cells(1,3).Value=15; o.Range('A1:C1').Select; o.Charts.Add().Type=-4100; "), Str("close();"), '"', VK_RETURN |>