05-15-2021
06:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
05-15-2021
06:04 PM
I had a quick look in the API help and there is little information on the cable and harness API 2020.
You can use either send keys or mouse control to navigate through the dialogue box.
The below opens the "Add files to List" dialogue in Reports in the assembly environment. It will at least remove some tedious clicks and help navigate.
'https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.sendkeys.send?view=net-5.0 Sub Main Dim oCommandMgr As CommandManager oCommandMgr = ThisApplication.CommandManager Dim oControlDef As ControlDefinition oControlDef = oCommandMgr.ControlDefinitions.Item("HSL:Cable:Generate_Report") Call oControlDef.Execute Call wait(0.6) System.Windows.Forms.SendKeys.SendWait("{F10}") System.Windows.Forms.SendKeys.SendWait("{RIGHT 2}") System.Windows.Forms.SendKeys.SendWait("{ENTER}") System.Windows.Forms.SendKeys.SendWait("{ENTER}") System.Windows.Forms.SendKeys.SendWait(" ") End Sub 'https://stackoverflow.com/questions/15857893/wait-5-seconds-before-continuing-code-vb-net 'Timer to allow time for form to come into focus. Private Sub wait(ByVal seconds As Integer) For i As Integer = 0 To seconds * 100 System.Threading.Thread.Sleep(10) ' ThisApplication.DoEvents() Next End Sub
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan
Or if this helped you, please, click (like)
Regards
Alan