Hi, I wonder if it is possible to remove a workspace icon without user intervention.
I know @Command([FileDatabaseRemove]);
will remove it, but users will have to answer OK to the question “remove selected item(s)?”
As I don’t want the users to know what happens, as most users don’t take the time to read instructions, pop-ups I want to make sure the icon is removed.
I’ve heard of some unsupported way of doing this - anyone?
And yes, I’ve searched the forum…
Subject: remove icon without user having to OK it
Search the 4/5 forum as this is not a specific ND6 problem. In fact, you selected “all releases” yourself.
You will find many posts over there.
Subject: remove icon without user having to OK it
I have dones this in the past using script by registering the Windows user32.dll and using the function that puts keystrokes in the keyboard buffer.
Essentially you write code to do this:
- Close the database and make the workspace active (in focus) - this requires formula language as there is no method in script to do this (put it in the postopen event of the database and then once you have switched focus, chain an agent call that contains script to do step 2 onwards)
Hint:
FileCloseWindow
WindowWorkspace
ToolsRunMacro(“your script agent name”)
-
Add the icon you want to remove, this makes it active (or on top of a replica stack)
-
Stuff the hex code for the Del key into the buffer with the API call
-
Stuff the hex code for SPACE or ENTER into the buffer (this is the one that confirms the dialog) - it happens so fast all the user sees is a flicker of the icon to top and then it disappears.
An article was posted recently here about it:
http://www.dominozone.net/members/domzone/dzone.nsf/lupContents/F2C6DEF47976C9ACC1256D0B004DCF90?OpenDocument
This was posted after I had come up with my solution and is reportedly independent. The two are extraordinarily similar.