topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday April 16, 2024, 2:51 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Start things according where/what they are  (Read 4599 times)

tamer1

  • Guest
IDEA: Start things according where/what they are
« on: March 03, 2007, 10:48 AM »
Hi there!

My idea is to have one single icon on the desktop to open various stuff drag 'n dropped on it. Or maybe a context menu (I'll just refer to it as Starter from now on). This would help opening stuff easier without a memory resident program.

Of course you can use the Open context menu for this. But wait, there's more! ;D
You could configure Starter to not open specific items with the default associated program, but some other way.
And you could configure to pause after a number of items. This might not be needed, but if you drag 'n drop too many items on a program, it doesn't open every one of them (at least Word gives you an error). Using the "Open" command in the context menu this error doesn't occur, but it opens the documents a bit slower. But don't stop reading yet, there's even more!
I understand it might be necessary for some tasks, so there should be an option to toggle if  Starter stops after every item or not. For example if you open a bunch of documents in Word, it'd load the first one and wait for you to close it before opening the second. And this is not everything! Well... Actually, it is.

I think the config file should look something like this (but, you know, I'm not really a programmer):
what you want to start; with the program ...;using the parameters ...;stopping after every item or not;pause for ... ms after every ...th item;
For example:
%programfiles%\Quake\%dir;%programfiles%\Quake\glquake.exe;-game %dir;1;0/0;
If you drag 'n drop a directory with the path: "%programfiles%\Quake\anydirectory" on Starter it runs "%programfiles%\Quake\glquake.exe -game anydirectory". So your favourite quake mod starts.

Of course it'd be necessary for Starter to handle environment variables (like %temp%, %programfiles% and others) and some new variables too (like %dir = any directory).

And what else should it do? Nothing. Nada. Nichts. It's just there to start things according the file path. At least I think so. And you could always start Autohotkey programs, scripts and whatnot with it.

I have this worked out even more, ignoring the fact that I couldn't program it myself. But the question is: is it possible to write such a thing with Autohotkey? And wouldn't it be too slow (compared to simply opening the files)?

If this is not a "Coding snack" but a 3 course meal (I'm "sure" I'm the first to write something like this  :) ) then sorry.

Anyway, keep up the great work.

chedabob

  • Participant
  • Joined in 2006
  • *
  • Posts: 34
  • C# Master (if only!!!)
    • View Profile
    • Donate to Member
Re: IDEA: Start things according where/what they are
« Reply #1 on: March 09, 2007, 03:43 PM »
hmm, I might have a go at this. Im pretty sure it could be done fairly easy using commandline parameters.

tamer1

  • Guest
Re: IDEA: Start things according where/what they are
« Reply #2 on: March 14, 2007, 01:59 PM »
I'm happy to hear that someone else thinks it's not such a bad idea.
Another idea: a variable might be needed to describe complex paths easily (like %subdir = any directory and every subdirectory).
So, for example:
D:\DOSgames\%subdir\*.exe;%programfiles%\Dosbox\dosbox.exe
would start any exe with the Dosbox emulator if it's somewhere in the D:\DOSgames\ directory.

(By the way, which programing language is the best suited to write this kind of programs?)

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: IDEA: Start things according where/what they are
« Reply #3 on: March 29, 2007, 02:49 AM »
tamer1,
If I understand what you want corretly, then it can be done easily in AutoHotKey or some similar script tool (it's free, see autohotkey.com ). For example, here's a script that AutoHotKey can make a compiled .exe file out of. When you drop a file on it, it checks if the file is from one of two folders and runs a set program based on that. To look for other folders and run other programs, just expand the basic formula for those cases (some programs need a special character before the path to the dragged and dropped file though. So you might need "run, C:\Program\UltraEdit-32\uedit32.exe /%1%" or -%1% or something like that in some cases. Hope this helps!

SplitPath, 1,, xdirname
if xdirname = C:\program\xx
 run, notepad %1%
if xdirname = C:\program\xx2
 run, C:\Program\UltraEdit-32\uedit32.exe %1%
return