WOW...
How nice does that work, a little flash up of the command window then it disappears.
I like the touch of the "Decompress" button changes to wait. Then a nice little PING to end it.
Cheers, once again..
Announcement
Collapse
No announcement yet.
Need a bit of help from the pro's. Esctract .iso
Collapse
X
-
Use Window.EnumerateProcesses() to obtain a list of the running processes. Look for a window which is running the command line interpreter (cmd.exe) and get its handle. Once you have found a window, use Window.Minimize() or Window.Hide() to remove it from the desktop. Note: this will hide or minimize all visible cmd.exe windows if you have more than one.
UlrichAttached Files
Leave a comment:
-
@ Ulrich
Sorry to bother you. Been messing with that code and well, I can not figure out how to not have the command window show.
With using the Shell.execute you can set the window to (0)
But the command windows is shown with this new one.
I have been trying to figure out how to do it with asking for your help, once again but alas I can not.
Any chance you could cast your magic wand over the code and see how to not have the command window show please.
No worries if you don't fancy it.
Leave a comment:
-
Hi Ulrich.
Took me a little while but I managed to amend your decompress script to fit my one button setup.
This will make you laugh.
Once I had the extracting with the progress working I realised the file names were not showing like on your example.
Took me about an hour messing and wondering why before I realise I had not made a "label"
ohhh dear.
cheers again.
Leave a comment:
-
Ulrich. Ulrich. Ulrich..
You are a frigging star !!
How complicated does that look. I would never have figured that script out.
If I may can I use it in my project and any future ones I may do ?
I know it won't be my work, I can put a "Thanks to Ulrich" on my "extract ISO" page..
Been trying to work summet else out.
on the "local sCmdLineArgs" can the arguments be words ? or do they have to be letters.
Hope that does not sound dumb.
I have this script on a .cmd Which starts DISM and mounts a windows install.wim file.
dism /mount-wim /wimfile:%~dp0install.wim\install.wim /index:1 /mountdir:%~dp0mount
Is that sort of thing possible or not ?
Thanks Ulrich.
Just realised summet. That DISM command HAS to run as ADMIN.
My project is not set to invoke that.... I better change it and test things all over again..
Leave a comment:
-
You can display the progress of the 7-Zip extraction in the interface of your own application, but this probably isn't a script which you would create easily without having a bit more experience.
Click here for a demo (it will take a moment to load). The project is attached.
Ulrich
Leave a comment:
-
Been messing about and testing it out on various .iso images and I noticed summet.
While extracting the Win 7 image it obviously took a while but there was no way of telling the user this.
So I tested out trying to add a progress bar. urrrrrrr, could not do it.
So I decided to go down the status dialogue route.
Even with the StatusDlg.ShowProgressMeter set to true, it did nothing.
my script\code now looks like this
-- opens a file browse window to select the iso image
isofound = Dialog.FileBrowse(true, "Locate File", _DesktopFolder, "iso images (*.iso)|*.iso|", "", "iso", false, true);
if (isofound[1] ~= "CANCEL") then
local sCmdLineArgs = "x \"" .. isofound[1] .. "\" -y -o\"" .. "C:\\DISM\\7zip\\files" .. "\"";
-- displays a message informing the iso is being extracted
StatusDlg.Show(MB_ICONINFORMATION, false);
StatusDlg.SetTitle("iso Extraction");
StatusDlg.SetMessage("Working...");
StatusDlg.SetStatusText("Please Wait. Extracting Files.");
StatusDlg.ShowProgressMeter(false);
--Executes the command to extract the iso image
Shell.Execute("C:\\DISM\\7zip\\7z.exe", "open", sCmdLineArgs, "", 0, true)
-- Closes the message regard the files being extracted
StatusDlg.Hide();
--Displays a timed mess to show the job is complete
Dialog.TimedMessage("Files Extracted", "Done", 2000, MB_ICONINFORMATION);
end
Totally amature-ish
cheers..
Leave a comment:
-
Just to add.
I know at the mo it will let me select any file, I will write the "Dialog.FileBrowse" to only look for .iso files..
Leave a comment:
-
@ Ulrich
:yes
I downloaded your example. I did not want to use any of your scripts in my own project, simply because it would not have been my work.
I looked, read. Looked, read. Read again and again and again.
Adapted it to fit my needs. Did not work.
Tried again and again and again. Finally it sunk in !!!
I could look and see where I was typing the destination folder wrongly.
I could look and see where I was writing the Shell.Execute wrongly.
I amended my script and bingo it bloody worked.
isofound = Dialog.FileBrowse(true, "Locate File", _DesktopFolder, "All Files (*.*)|*.*|", "", "dat", false, false);
if (isofound[1] ~= "CANCEL") then
local sCmdLineArgs = "x \"" .. isofound[1] .. "\" -y -o\"" .. "C:\\DISM\\7zip\\files" .. "\"";
Shell.Execute("C:\\DISM\\7zip\\7z.exe", "", sCmdLineArgs, "", 0, true)
end
This is great and I just know I will be able to apply this sort of thing later on down the line in my new project.
Looking at my script\code Ulrich, can you see where I could make it neater\better ?
I suppose I could add a "if folder does not exist, make it" but if all goes well that DIR will definitely exist.
What do you recon, is my script\code OK ?
Thank's
Leave a comment:
-
Originally posted by Old Fellow View PostCan I ask how long have you been playing with AMS ?
I see your join date is 2005 so at least 9 years, nice.
thank's
Ulrich
Leave a comment:
-
@ Ulrich
Just looked at the scripting from your attached example.
It looks pretty darn good. I recon I can read it and make my own to suit my needs but let me thank you for doing that.
Can I ask how long have you been playing with AMS ?
I see your join date is 2005 so at least 9 years, nice.
thank's
Leave a comment:
-
Cheers for that post.
I feel my wrist has been slapped.
I will read through all the posts and try to understand it a bit more.
Will look at that example very shortly, just on the old iPad at the mo. Need to crank the PC up.
Cheers Ulrich.
Leave a comment:
-
I already showed you how to use parameters with spaces, didn't I? It appears that you are hardly looking at the code which is given to you and just insist in doing it "your way". Maybe it would be better if you follow the tutorials which are offered on this web site and learn how to use this product in a more organized way, instead of running in circles, and using trial and error to see what works.
I mentioned repeatedly that you don't need to write a batch, yet there you are again, insisting in writing a text file. And you are doing it incorrectly, as you are always attaching new text instead of rewriting the command, of course.
I present here a working example. I suggest that you try to understand what is being given to you.
UlrichAttached Files
Leave a comment:
-
Well just found another problem with my method.
When choosing a file from a dir with spaces in the names it does not work.
appending the .cmd manually adding the "" helps it to work.
I have learnt summet but not the right thing. Not yet !
Leave a comment:
-
local sCmdLineArgs = "x -y -o\"" .. filefound[1] .. "\"";
Dialog.Message("Info", "I need to run 7zip with this command line: " .. sCmdLineArgs);
I have added Shell.Execute(), put my 7z.exe path all over and I just keep getting errors.
using my Heath Robbinson method
TextFile.WriteFromString("C:\\Users\\Malc's PC\\Desktop\\new.cmd", " ", true);
gotit = Dialog.FileBrowse(true, "Locate File", _DesktopFolder, "All Files (*.*)|*.*|", "", "dat", false, false);
TextFile.WriteFromTable("C:\\Users\\Malc's PC\\Desktop\\new.cmd", gotit, true);
Dialog.Message("Notice", gotit[1]);
result = File.Run("C:\\Users\\Malc's PC\\Desktop\\new.cmd", "", "", 0, false);
But immediately runs into trouble. If I try to select another file the .cmd code is all to cock and messed up.
I need to learn how to delete the string the file browse is creating from the table.
But really. I need to figure out your coding. I am sure it is fool proof.
it's getting late, or early in the morning so soon off
Leave a comment:
Leave a comment: