- AuthorPosts
- February 7, 2019 at 3:48 am #25371DavidParticipant
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:7February 7, 2019 at 11:11 am #25372Yutaka EmuraKeymasterI 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,
February 9, 2019 at 5:59 am #25393DavidParticipantI 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.
February 9, 2019 at 6:58 am #25394DavidParticipantSorry, 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!
- AuthorPosts
- You must be logged in to reply to this topic.