Jump to content

Kruxe

Active Members
  • Posts

    27
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Kruxe's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Good to know, thanks for the info!
  2. I think I solved the issue.. 1. So originally I was using the excel UDFs codded in the fashion below and excel was still popping up on some PCs. Global $oExcel = _Excel_Open(False) Global $oWorkbook = _Excel_BookOpen($oExcel,"File Path to Shared Workbook") 2. I attempted to change the parameters of the UDFs even further and it still popped up.. Global $oExcel = _Excel_Open(False) Global $oWorkbook = _Excel_BookOpen($oExcel,"File Path to Shared Workbook", True, False) 3. Finally I just ended up creating the object and using the COM rout. This worked, Excel does not show up on any PC. Global $oExcel = ObjCreate("Excel.Application") Global $oWorkbook = $oExcel.Workbooks.Open("File Path to Shared Workbook") $oExcel.Visible = False Could there be an issue with the way the Excel UDF is handling this? Again, I really appreciate your time and help, just wanted to share the solution that's currently working for me. - Kruxe
  3. so I removed all the add-ins and it still pops up! I made it a regular workbook (Was a shared workbook) and it works fine... Only issue is.. I need it to be shared LOL!
  4. ahhh! I did notice an add-in installed in the ribbon bar, I will try to remove it and run the script again. thanks again for the help water! Kruxe
  5. so it does become visible after the MsgBox..
  6. I did not see any instances of Excel running and it still popped up. Now the file is a shared file, could that have anything to do with it? its just weird because its hidden on other PCs..
  7. Hey Water, I'm not sure what you mean, I'm not getting an error at all. The script executes and does what it is coded to do but on some PCs excel just pops up.. the @extended return shows "1"
  8. Hi all, I'm experiencing an issue with excel where when the script executes, excel will be hidden on some PCs but shows up on others. All the PCs have the same version of Microsoft office installed and I'm executing the same script coded with the line below that is supposed to keep excel hidden. Has anyone experienced this issue before or am I the only one? Local $oExcel = _Excel_Open(False) thanks for the help! Kruxe
  9. Imports PCDLRN Public Class PCDMIS Dim DmisApp As PCDLRN.Application Dim DmisPartPrograms As PCDLRN.PartPrograms Dim WithEvents AppEvents As PCDLRN.ApplicationObjectEvents Private Sub PCDMIS_Load(sender As Object, e As EventArgs) Handles MyBase.Load Try DmisApp = CreateObject("PCDLRN.Application") DmisApp.Visible = True DmisApp.WaitUntilReady(1000) DmisPartPrograms = DmisApp.PartPrograms AppEvents = DmisApp.ApplicationEvents Catch ex As Exception MsgBox(ex.StackTrace) Environment.Exit(0) End Try End Sub Private Sub OpenProg_Click(sender As Object, e As EventArgs) Handles OpenProg.Click Try Hide() DmisPartPrograms.Open("", "CMM1") Catch ex As Exception MsgBox(ex.StackTrace) End Try End Sub Private Sub AppEvents_OnStartExecution(PartProg As PartProgram) Handles AppEvents.OnStartExecution MsgBox("Execution started: " & PartProg.Name) End Sub So this is capturing the event just fine using VB, but i don't want to use VB, i want to use auuutooooiiiiitttt lol
  10. Guys, I don't think this is as simple as following these examples or, maybe it is! lol. The application I'm trying to capture the events from is kind of setup weird and I think autoit can do it but my syntax is probably incorrect. the event I am trying to listen for is "OnStartExecution". I have posted a link to the Object Hierarchy chart and hopefully it can explain batter than i can on here. Also in this post is what i have so far for code but I have had absolute 0 success with it. Local $DmisApp = ObjCreate("PCDLRN.Application") Local $ActivePartProgram = $DmisApp.ActivePartProgram Local $AppEvent = $DmisApp.ApplicationEvents While 1 ObjEvent($AppEvent,"ExEvent_") Sleep(10) WEnd ; ... Func ExEvent_() MsgBox("","","EventFired") EndFunc https://docs.hexagonmi.com/pcdmis/2019.1/en/helpcenter/mergedProjects/automationobjects/object_hierarchy_chart.htm
  11. @water coming back to this post after some time and im still struggling with it. Im not grasping how i am supposed to set the code up in autoit to be like the VBA code above. I am not familiar with VBA but maybe one of you can what i have gotten so far is this and honestly don't know if its even close.. Local $DmisApp = ObjCreate("PCDLRN.Application") Local $AppEvent = $DmisApp.ApplicationEvents Local $ActivePartProgram = $DmisApp.ActivePartProgram ObjEvent($AppEvent, "Worksheet_","OnStartExecution") While 1 sleep(10) WEnd Func Worksheet_Change() MsgBox("","","yes") EndFunc
  12. Water, This information puts me on the right track, thanks again for the help! Kruxe
  13. sorry water, I am still a giant noob, would it be possible to get some example code? thanks!
×
×
  • Create New...