Skip to main content

Dialog not in the right place

Hello everyone,
let me start with that I am new to IDEAScripting. I'm trying to make a script that allows users to add keywords they want to search to an array. I got the array up and running and can add the keywords without any problem. I made a dialog to make it easy for the user to add the words and again the functionality of the dialog is fine. The problem for me is that in the dialog menu I place the dialog at 100,260,50,180. But when I run the macro it moves the dialog to the top left corner of the screen. No problem I thought, I will just write the dialog code above the script like a lot of people do on this forum to see if that fixes my problem.
But then another problem occures, as soon as I type Begin Dialog it removes the scentences. I can type the rest of the code for the Dialog without any isues, I can even write Begin Dialo, but when I type in that G it just removes the whole scentences. I can type end Dialog, I can type Dialog Begin but as soon as Begin Dialog is in the scentences it just removes the scentences. I am sitting here right now just staring at my monitor thinking what is happening? Also the cursur automaticly goes to the top of the Script.
If anyone knows what I can do to fix this, I would love to hear it.

Brian Element Fri, 09/14/2018 - 19:02

Hi IGuniqu and welcome to the site.

You brought up a couple of interesting things.  The first is the location of the dialog, this location is actually in reference to IDEA, if you have IDEA open on your screen the dialog will open based on the upper left hand corner of IDEA, if IDEA is minimized then it defaults to the upper left hand corner of your screen.  So what is probably happening is that you have IDEA minimized and that is why it is defaulting to the top left corner of the screen.

The Begin and End Dialog disappearing, that is a problem with the editor.  For whatever reason the IDEAScript editor hides the code for the dialog, the only way to see it is if you save the IDEAScript file and then open it in a text editor such as Notepad or Notepad ++, you will be able to see the Begin and End Dialog from there and you can make changes to it.  If you want to do any adjustments manually you need to do it in a text editor and not in the IDEAScript editor as it forces you to use the graphical interface for creating the dialog.  This is why the line disappears as the editor automatically hides those lines.

Hopefully this helps you out a bit, let me know if you have other questions.

Thanks

Brian

IGunique Mon, 09/17/2018 - 04:18

In reply to by Brian Element

Hi Brian,
Yes that explains a lot. I was using the script editor on 1 monitor and had IDEA open on the other monitor. When I ran the macro again on 1 monitor everything was working properly.Good to know that it will work with a text editor. Thank you for the information and have a good day!