Copy link to clipboard
Copied
Hello!
My question is about a vbscript i made and installed it in the "C:\Program Files\Adobe\Adobe Illustrator CC 2015\Presets\Scripts" folder.
the name for the script is Test.vbs and i use version CC 2015
when i run my vbscript with the file menu -> scripts -> test.vbs it appears that:
* the variable name 'Illustrator' is already taken as an object.
* wscript.quit won't work anymore: "error, could not accest this object 'wscript'"?
i can't find anything in the documentation about this things, any help or explanation would be welcome!
Copy link to clipboard
Copied
Can you post the script so we can debug and where things may be going wrong?
Copy link to clipboard
Copied
I will post a simple example that illustrates the problem
(test it just by opening it, then by using it from the menu in illustrator)
'variable name already taken?
illustrator = "this is a test"
msgbox illustrator
'can't quit the script?
if msgbox("want to quit?",vbyesno) = vbyes then wscript.quit
msgbox "some other code"
Copy link to clipboard
Copied
Did you write some code and try to declare a variable called "illustrator"? If so, i think that's a bad idea from the get go.
I apologize though if i'm just ignorant. I'm not really familiar with VBScript since i'm a mac user.
Try changing the variable declaration from "illustrator" to "testMsg" like this:
testMsg = "this is a test"
msgbox testMsg
if msgbox("want to quit",vbyesno) = vbyes then wscript.quit
msgbox "some other code"
Copy link to clipboard
Copied
i actually used the name illustrator for the appref object for convenience..
changing the name would off course solve the name problem but the point is the name is already taken.
also, so are there other objects predefined to?
what are the things i can do with that illustrator object?
and: quitting the script seems impossible when run from the menu?
thanks for trying to help me williamadowling
Copy link to clipboard
Copied
I think there must be a language barrier here because i'm not understanding what you mean. Likely this is just because i'm used to writing JavaScript and have no experience in VB. Perhaps someone more familiar with VB can be of more help than me.
Sorry =(