Check if a program is running before executing next !Bang command? Thread last updated on 2008-07-06 09:55:58

Posted by member 376748 on 2008-06-25 08:26:57

I'm using NexusFile as a replacement file manager for explorer, but one problem it has is that you can't use it to open folder shortcuts: even if you reassign it to be the default program for opening folders, it'll launch, but not go to the specified folder. I worked around this by having my shortcuts execute the program, then use TypeIn to input the keyboard shortcut for the appropriate folder. Unfortunately, if the program takes longer than the .4 second pause to launch, the keystrokes are sent to the desktop and the module throws an error message. Is there any way to make the !TypeIn bang wait until the program has launched before execution?

Posted by member 212670 on 2008-06-26 05:45:50 link

Locate the nexusfile.ini file inside the NexusFile install folder. In the ini file, you'll see two lines that say...

lastpath1=c:\somepath

and...

lastpath2=c:\some\other\path

Those specify which folders will be opened when you run the program. lastpath1 refers to the left panel, and lastpath2 refers to the right. Use a text editing module (xtextedit for example) to set the path(s) before you run nexusfile.exe. :)

Backup the ini file before you start experimenting!

Posted by member 376748 on 2008-06-26 14:20:24 link

Oooooh! Oh-ho-ho! I didn't know there was a module that'd let me dynamically edit text files like that! Neeeeat!
Well, that's made of awesome and success. Thank you very much!

Posted by member 1 on 2008-06-26 19:44:51 link

One of the more common modules for a while. It is what has led users to be able to setup config systems for their themes.

Posted by member 376748 on 2008-06-27 04:56:11 link

Yeeeaaah. Unfortunately, it doesn't work here.
The nexusfile.ini file uses unicode encoding, and xTextEdit doesn't seem to be able to find strings in a unicode encoded file... Any more ideas?

Posted by member 212670 on 2008-06-27 15:19:30 link

I'm sure lslua could do it.

Posted by member 1 on 2008-06-27 16:52:37 link

LS Support unicode so xTextEdit should too...at least it is supposed to. Try just straight ole boring textedit and see if it works.

Posted by member 376748 on 2008-06-30 13:05:07 link

Well, I've checked. Neither xTextEdit nor plain TextEdit can work with Unicode files. In the case of xTextEdit, running it in debug mode simply makes it tell me it couldn't find the string, and in the case of TextEdit, it says it can't open the file.

Posted by member 93947 on 2008-07-04 05:29:01 link

There is no *unicode encoding* Thats a contradiction in itself, since the whole point of unicode is to get rid of the encoding. To store unicode, it has to be encoded, with UTF-8 being the prime choice.

If the file uses UTF-8, lslua's xtextedit module will *probably* work. If it doesnt work with UTF-8, you will have to write your own script and read/write binary. If it is in some other utf scheme, you will have to give up, or use Python.

Posted by member 376748 on 2008-07-06 09:55:58 link

It doesn't work. Giving up time it is... Thanks anyway.