Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #25371
    David
    Participant

    I have two macros which define some menu items. Since update to V18.6, it display “Object expected” error. What’s reason?

    My code is:

    mainMenu=CreatePopupMenu(); 
    mainMenu.Add("顺序编号-仅行首的数字(自然计数)",1); 
    mainMenu.Add("顺序编号-仅行首的数字(多位计数)",2); 
    mainMenu.Add( "", 0, eeMenuSeparator ); 
    mainMenu.Add("顺序编号-选定范围内的数字(自然计数)",3); 
    mainMenu.Add( "", 0, eeMenuSeparator ); 
    mainMenu.Add("顺序编号-所有的数字",4); 
    
    var whichItem=mainMenu.Track(); 
    switch(whichItem) 

    The error dialog is:
    Title bar: EmEditor Macro Error
    Object expected
    File:C:\………..\renumber.jsee
    Line:7

    #25372
    Yutaka Emura
    Keymaster

    I can’t reproduce the issue. (I see this is just a portion of your macro, and I tested by deleting the last line “switch(whichItem)”.

    It seems that EmEditor is not properly installed. Can you uninstall EmEditor, restart Windows, and install EmEditor again?

    Thanks,

    #25393
    David
    Participant

    I always use portable version of EmEditor. While updating to new version, I’d like to copy the files of new version into my existed folder and overwrite old version, since I create some macros, customized templates, dictionaries, workspace, toolbars, icons…….In the past, it always works very well. But update to v18.6, all macros can’t run and get the error “Object expected”. I test the original portable version which is downloaded from website, it works. But strange thing is my Emeditor can’t work. I want to find the reason.

    #25394
    David
    Participant

    Sorry, I had find the reason: in the properties of Emeditor shortcuts, I activate the option “run the program as an administrator”. Deactivate it and now it works very well!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.