cplusdummy Posted February 12, 2013 Author Posted February 12, 2013 (edited) Do you mean something like (extremely simplified .cmd batch file):@ECHO OFFSTART "" /WAIT NOTEPAD.EXE %1http://ss64.com/nt/start.htmljaclazjaclaz you're the MAN! Simple answer to a simple question!As promised, here's why I needed this...squidooDOTcom/open-illustrator-files-in-maximized-windowI don't want to include the the full link as it would be considered as spam and retyping the answer would be annoying.Before you might think there must be a simpler solution for this... well, there is not! Googled it and people are reporting this problem to no avail.Thank you everybody! Edited February 12, 2013 by cplusdummy
jaclaz Posted February 12, 2013 Posted February 12, 2013 Well, your explanation is completely unlike an explanation , post the full link if you want to explain something.BTW that small batch will also open a command prompt window if double clicked or added to a context menu.You might want to use a tool like nircmd:http://www.nirsoft.net/utils/nircmd.htmlinstead.Look for it's commands exec, exec2 and execmdhttp://www.nirsoft.net/utils/nircmd2.html#usingjaclaz
cplusdummy Posted February 12, 2013 Author Posted February 12, 2013 Well, your explanation is completely unlike an explanation , post the full link if you want to explain something.Okay,http://www.squidoo.com/open-illustrator-files-in-maximized-windowI'll edit the squidoo post tomorrow and link back to this discussion for compensation...Yes, it opens the command prompt window but once the file opens it disappears.Thanks again!
jaclaz Posted February 13, 2013 Posted February 13, 2013 Yes, it opens the command prompt window but once the file opens it disappears.With the /WAIT parameter? Even if it does, let me rephrase previous post as "a black box will either open (and remain open until you terminate the "target" program) or flash briefly on the screen, to avoid that use nircmd, INSTEAD" jaclaz
gunsmokingman Posted February 13, 2013 Posted February 13, 2013 I dont know if this is what he wants, but this hides the cmd promt window, justdrag and drop any file notepad can open, Dim C34 :C34=Chr(34)If WScript.Arguments.Count = 1 Then CreateObject("Wscript.Shell").Run("%Comspec% /C @Echo Off && Start " & _ C34 & "" & C34 &"/Wait Notepad.exe " &WScript.Arguments(0)),0,TrueEnd If Notepad.vbs in Cmd promt, open the text fileCD C:\Users\Gunsmokingman\Desktopecho %CD%C:\Users\Gunsmokingman\DesktopOpenNotepad.vbs TelusUpload.txt
cplusdummy Posted February 13, 2013 Author Posted February 13, 2013 Yes, it opens the command prompt window but once the file opens it disappears.With the /WAIT parameter? Even if it does, let me rephrase previous post as "a black box will either open (and remain open until you terminate the "target" program) or flash briefly on the screen, to avoid that use nircmd, INSTEAD" jaclazI'm really not familiar with windows scripting/programming but I have PHP knowledge so I added the /MAX parameter after /WAIT using some logic.Now when I double click on .ai or .eps file the black box opens and remains open until the program completely processes/opens the file. After few seconds, once the file is opened and editable the box DISAPPEARS AUTOMATICALLY.I don't know if this is how it's supposed to function but it's serving the purpose perfectly!
DataCracker7899 Posted February 17, 2013 Posted February 17, 2013 make batch file start C:\Windows\System32\Notepad.exethen save as .bat and all files.when you run it it'll open notepad
submix8c Posted February 17, 2013 Posted February 17, 2013 make batch file start C:\Windows\System32\Notepad.exethen save as .bat and all files.when you run it it'll open notepadYou mean like was proposed by jaclaz in post#11??? You might want to read a thread to get the full gist first... ( yeah, I've done the "repeat someone else" before... )
Yzöwl Posted February 17, 2013 Posted February 17, 2013 The only ways you can use a script is to associate a particular process with a specific file extension. (They are talking about double clicking on a .txt file)If you want to have a script executed in this manner you'd need to re-associate .txt files on the end user's system with the scripting engine pertinent to the type of script you're invoking.Your alternative is to create a script 'packaged/compiled' to an executable, name it notepad.exe in the location of your proper notepad.exe and use it to call that original notepad exe in its new location.The problem with both those approaches is that that they are to be carried out on your end users PCs.
jaclaz Posted February 18, 2013 Posted February 18, 2013 Yzöwl , the OP already tested the proposed solution, modified it a little according to his needs and is using it successfully (for his needs):Now when I double click on .ai or .eps file the black box opens and remains open until the program completely processes/opens the file. After few seconds, once the file is opened and editable the box DISAPPEARS AUTOMATICALLY.I don't know if this is how it's supposed to function but it's serving the purpose perfectly! This thread (actualy the issue that originated it) was "closed" until DataCracker7899 revived it by re-posting (incompletely) the SAME info already posted in it.jaclaz
DataCracker7899 Posted February 18, 2013 Posted February 18, 2013 so what? who cares. it isnt a big deal
jaclaz Posted February 18, 2013 Posted February 18, 2013 so what? who cares. it isnt a big dealActually it's NO deal at all.jaclaz
Yzöwl Posted February 18, 2013 Posted February 18, 2013 Yzöwl , the OP already tested the proposed solution, modified it a little according to his needs and is using it successfully (for his needs):I cannot find anything posted which provides what was asked. That was the reason for my response, (I certainly had no interest in replying to the pointless ramblings of DataCracker7899).Double clicking on a .txt file will not open a batch script with the 'clicked' file as a parameter. Double clicking on a .txt file will only open that .txt file in whatever program has been associated with .txt files.Right clicking could provide workable options but, as I stated, double clicking will not unless you make changes on the end users system.
bphlpt Posted February 19, 2013 Posted February 19, 2013 so what? who cares. it isnt a big dealIt just totally refutes your claim in your sig:I am a professional programmer ... i'm master in many programming languages and i can make websites too. The lack of capitalization and proper consistent sentence structure and punctuation in either your posts or your sig don't look very professional either.By the way, I agree with jaclaz's guess that your age is 13 or 14 at most.Look, no matter what you age is, you are perfectly welcome to be here and your participation is encouraged, but not your "pointless ramblings", as Yzöwl pointed out.Cheers and Regards
Recommended Posts