Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Richard Clubb on October 21, 2015, 06:42:47 pm
-
Hello.
I recently came across a very strange problem, when running a script on another PC it caused the Session.Input window to appear off the visible screen size.
Is there any way to override the "default" position of the Input dialogue?
Sincerely,
Rich.
-
Not that I know of.
Geert
-
But you could use the VBScript InputBox, which allows you to indicate the position
InputBox(prompt[, title][, default][, xpos][, ypos][, helpfile, context])
See https://msdn.microsoft.com/en-us/library/3yfdhzk5(v=vs.84).aspx for more info
Geert
-
This problem still exists and it's quite random. I've got JavaScripts that ask for user input and they are displaying sometimes input windows outside of "visible screen". For no apparent reason. This behavior can be seen on the same machine but also can be working ok on one and badly on the other (Repo in DB).
Dear Sparx could you please do something about that, for example overload Session.Input method with positionX,positonY attributes so we have a way to force window to be showed on screen?
-
I also had problems with Session.Prompt placing the box in odd places and now use vbscript inputbox for the reason Geert gave.
Just once thing... have you checked the parameter list? I have a vague recollection that one of my early errors was passing too many parameters thinking it worked like InputBox and the invalid parameters were indirectly causing bad placement.
-
Hello
I have observed that the placement of the Session.Input box isn't that random (but that doesn't mean it's logic, indeed): unlike the Session.Prompt that places at the center of EA's main area, the Session.Input box actually "tries" to place at the center of the "Scripting" window... or at the place where the Scripting window last was before it was closed.
If the Scripting window is at the center of the screen, you'll see the Session.Input box appear over it (I have tried doing several tests while moving the Scripting window from place to place on my screens : the Session.Input box follows the Scripting Window).
And it still works if you close the scripting window (the last position is remembered) !
If the scripting window is docked on the side of the screen, chances are the Session.Input box will only be partially visible and partially off screen.
Worse : if the Scripting window is docked on a screen side with auto-hide activated, the Session.Input box appears totally off screen.
An emergency solution to get it back is placing the mouse cursor over the corresponding input window icon you'll notice in the MS-Windows taskbar, wait for the window preview to appear then right click on it, choose "move", hit an arrow key on keyboard, move the mouse cursor to bring the invisible window back into visible screen area. :o
A better and long term solution is... not using the Session.Input method anymore and switch to Geert's VBScript InputBox suggestion.
Hope this may help.
Regards
Update : I have submitted it as a bug to Sparx through registered user bug report.