Page 1 of 1 1
Topic Options
#151315 - 2005-11-11 02:32 PM Gimp not running from my script
Stephen Wintle Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 444
Loc: England
Hi folks!

I'm having a problem getting gimp to run from my script, when I run the exe from the shortcut it works fine but I get an error when I try from kix of:

'The dynamic link library libglib-2.0-0.dll could not be found in the specified path c:\program files\gimp-2.0\bin;.;c:\winnt\system32;c:\winnt;c:\winnt;c:\winnt\system32\wbem

heres my code
Code:
 COPY "f:\PACKAGES\gimp2.2\gimp.kix" "C:\gimp.kix"

If EXIST("c:\gimp.kix") = 0
RUN "f:\packages\gimp2.2\gimp2.exe"
Else
Run "C:\Program Files\GIMP-2.0\bin\gimp-2.2.exe"
Endif



Steve.
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!

Top
#151316 - 2005-11-11 03:02 PM Re: Gimp not running from my script
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Two things to try:

1) Use SHELL instead of RUN

2) If still no work. Look at the properties of the shortcut, and note the start in directory, then before your SHELL statement, do a Kixtart CD <dir>

-Shawn

Top
#151317 - 2005-11-11 03:14 PM Re: Gimp not running from my script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You may want to give CreateObject("Shell.Application") a go.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#151318 - 2005-11-11 04:25 PM Re: Gimp not running from my script
Stephen Wintle Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 444
Loc: England
Hi,

Thanks for your replies could you give me some pointers on using 'createobject' and shell. Here is my adjusted code.

Code:
COPY "f:\PACKAGES\gimp2.2\gimp.kix" "C:\gimp.kix"

If EXIST("c:\gimp.kix") = 0
RUN "f:\packages\gimp2.2\gimp2.exe"
Else
cd "C:\Program Files\GIMP-2.0\bin\"
Shell "C:\Program Files\GIMP-2.0\bin\gimp-2.2.exe"
;Run "C:\Program Files\GIMP-2.0\bin\gimp-2.2.exe"
Endif




Regards

Steve
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!

Top
#151319 - 2005-11-11 04:32 PM Re: Gimp not running from my script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Since I have no idea what gimp is and where it is falling down, I am of no use to you. I do know that I have had success in specifying the working directory using "Shell.Application". Search the board and try some things out.

Following Shawn's advice, you may also need to issue a GO command. Also possible that gimp needs the interpreter so you may want to give %comspec% a shot. Possibly the DOS Start command as well.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#151320 - 2005-11-11 07:47 PM Re: Gimp not running from my script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
clearly the problem was that gimp was unable to find the dll, thus, it is not in start dir nor in system nor in path.
so, that leaves curdir where it is searched for.

if there is curdir specified in your shortcut, then the kix script should also provide that info.

and there les has told the ways to do it.
_________________________
!

download KiXnet

Top
#151321 - 2005-11-13 02:45 PM Re: Gimp not running from my script
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Try this - let me know if it works.
Code:
COPY "f:\PACKAGES\gimp2.2\gimp.kix" "C:\gimp.kix"

If Not Exist("c:\gimp.kix")
F:
CD "\packages\gimp2.2"
Shell ".\gimp2.exe"
Else
C:
CD "\Program Files\GIMP-2.0\bin"
Shell ".\gimp2.exe"
EndIf



Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#151322 - 2005-11-13 02:50 PM Re: Gimp not running from my script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Do not pass GO. Do not collect $100.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#151323 - 2005-11-14 11:17 AM Re: Gimp not running from my script
Stephen Wintle Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 444
Loc: England
Hi Glenn,

Thanks for the reply, I tried the dos 'start' command in my script but to no avail. The properties of the orignal gimp shortcut point to "%USERPROFILE%\\My Documents\My Pictures" in the 'start in' section of the shortcut with "C:\Program Files\GIMP-2.0\bin\gimp-2.2.exe" as the target.

Code:

COPY "f:\PACKAGES\gimp2.2\gimp.kix" "C:\gimp.kix"

If Not Exist("c:\gimp.kix")
F:
CD "\packages\gimp2.2"
Shell ".\gimp2.exe"
Else
C:
CD "\Program Files\GIMP-2.0\bin"
Shell "start \Program Files\GIMP-2.0\bin\gimp-2.2.exe"
EndIf



Regards

Steve.
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!

Top
#151324 - 2005-11-14 06:29 PM Re: Gimp not running from my script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm...
you say that you can't run the exe via kix shell but you can via doubleclicking it?
this is the same machine you try these both?
_________________________
!

download KiXnet

Top
#151325 - 2005-11-16 09:53 AM Re: Gimp not running from my script
Stephen Wintle Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 444
Loc: England
Hi,

Sorry I mean that when I double click original exe shortcut works fine, not my shortcut to the kix script. I still am no nearer to resolving this. Someone mentioned the 'go' commmand. I will try this...

Regards

Steve.
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!

Top
#151326 - 2005-11-16 08:14 PM Re: Gimp not running from my script
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
"go" isn't needed to switch drive letters unless you specify the drive letter in a variable - for example:
Code:

$Drive = 'X:'
X:
Go $Drive


lines 2 and 3 do exactly the same thing

It's important that you CD to the folder that contains the DLLs or other files needed to support the application. Reference the same path as the "Start In" definition in the shortcut.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 271 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.062 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org