запуск утилиты при запуске MapInfo

MapInfo, MapBasic
Ответить
Сергей1988
Интересующийся
Сообщения: 32
Зарегистрирован: 30 сен 2009, 15:50
Репутация: 0

запуск утилиты при запуске MapInfo

Сообщение Сергей1988 » 12 авг 2010, 06:59

Доброго времени суток :D

Подскажите, пожалуйста, есть ли такая возможность: вместо стандартного окна "Открыть сразу" запустить свою утилиту, чтобы открывался не стандартный диалог, а созданный мною. Запуск MapInfo я осуществляю из delphi.

__________________________________________________________________________________________________
Заранее спасибо :)

Сергей1988
Интересующийся
Сообщения: 32
Зарегистрирован: 30 сен 2009, 15:50
Репутация: 0

Re: запуск утилиты при запуске MapInfo

Сообщение Сергей1988 » 12 авг 2010, 10:28

Я в процедуре main прописываю
sub main
call myapplication(т.е. процедуру в которой создается диалог)
end sub
sub myapplication
Dialog....
end sub
а в делфи на onclick я прописываю
MapInfo.Do('Run Application "C:\Documents and Settings\user\test\test.MBX"');

мне вылезает ошибка...и MapInfo не запускается...можно как-то сделать так, чтобы при загрузке mapinfo появлялся мой диалог, я осуществляю через механизм управления OLE. Кто может помогите советом.

Boris
Гуру
Сообщения: 4205
Зарегистрирован: 10 апр 2006, 22:34
Репутация: 433
Откуда: Париж

Re: запуск утилиты при запуске MapInfo

Сообщение Boris » 12 авг 2010, 12:12

вы использовали статьи http://www.delphisources.ru/pages/faq/b ... info1.html ?
что бы мы не обсуждали уже описанное?
и еще. Это два разных вопроса или один?
Теперь относительно запуска чего бы то ни было в начале. Если это какой-то сложный алгоритм, то для него надо написать команду на MapBasic'e и вызывать ее при загрузке собственного рабочего набора. Как загружать свой набор описано в MapInfoProfessionalSupplement.pdf (в Eng 9,5 это страница 51) :
Creating a Startup Workspace
STARTUP.WOR is the name you give to a workspace from which MapInfo Professional is run. You
can create it so that MapInfo Professional automatically opens various tables and windows on
startup. When you use STARTUP.WOR, MapInfo Professional performs the startup actions
regardless of what you did in your previous MapInfo Professional session or how you have set
preferences for MAPINFO.WOR.
To create a workspace:
1. Open the tables and windows you want in your workspace. Size and position them as you
please.
2. Choose File > Save Workspace.
3. Name your workspace “Startup” and save the workspace into your “home” directory. By
“home” directory we mean your private Windows directory.
When you run MapInfo Professional, the following occurs in the order shown:
1. If there is a STARTUP.WOR in the MapInfo Professional program directory, it is run.
2. Then, if there is a STARTUP.WOR in your home directory it is run. (When there is a
STARTUP.WOR in both the MapInfo Professional program directory and your home directory,
both will= run.)
3. Then, if any file names are given on the command line—or if you double-click a document,
MapInfo Professional loads those files. MapInfo Professional support adding workspaces
(.WOR), running applications (.APP), and opening databases (.TAB) on the command line.
4. Only if MapInfo Professional did not add a workspace or run a program from the command line
does it then check the AutoLoad preference and load MAPINFOW.WOR from the user's home
directory. When the preference is set, and the file is found, it is loaded. Note that if we had a
workspace or application on the command line, we skip the AutoLoad.
5. Finally, if MapInfo Professional didn't load a workspace or run an application from the command
line, and it didn't AutoLoad MAPINFOW.WOR, then MapInfo Professional shows the Tool
palette.

Ответить

Вернуться в «MapInfo»

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и 16 гостей