| View previous topic :: View next topic |
| Author |
Message |
joey3002 Guest
|
Posted: Thu Mar 18, 2010 5:47 pm Post subject: Print Selected files |
|
|
I am trying to automate something.
I have a need to print many files at once. I would like to select the files, and then using the program, print each one.
| Code: |
Loop, %selectedFiles%
{
Run, %selectedFiles%
WinWait, APPNAME ;<---Change this to the name of the window that you see using the AutoIt Windows Spy
Send, ^p
Sleep, 1000
WinClose, APPNAME
}
|
Any help you can give me would be really appreciated.
thanks |
|
| Back to top |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4652 Location: AHK Forum
|
|
| Back to top |
|
 |
joey3002
Joined: 18 Mar 2010 Posts: 36
|
Posted: Thu Mar 18, 2010 6:11 pm Post subject: |
|
|
how would i incorporate that for all the selected files?
thanks |
|
| Back to top |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4652 Location: AHK Forum
|
|
| Back to top |
|
 |
joey3002
Joined: 18 Mar 2010 Posts: 36
|
Posted: Thu Mar 18, 2010 6:33 pm Post subject: |
|
|
| HotKeyIt wrote: | | Selected where from? |
Sorry.. from explorer in windows xp
here is what I have but its not working..
| Code: |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
^l::
WinGetClass explorerClass, A
ControlGetText currentPath, Edit1, ahk_class %explorerClass%
; msgbox >%currentPath%<
ControlGet, selectedFiles, List, Selected Col1, SysListView321,ahk_class %explorerClass%
msgbox %selectedFiles%
Loop, Parse, selectedFiles, `n ; Rows are delimited by linefeeds (`n).
{
;msgbox >%currentPath%\%file%<
; Run, %A_LoopFileFullPath%
Run, %currentPath%\%file%
Run print %selectedFiles%
; WinWait, EditPad Lite ;<---Change this to the name of the window that you see using the AutoIt Windows Spy
; Send, ^p
Sleep, 1000
}
return
|
|
|
| Back to top |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4652 Location: AHK Forum
|
|
| Back to top |
|
 |
joey3002
Joined: 18 Mar 2010 Posts: 36
|
Posted: Thu Mar 18, 2010 6:56 pm Post subject: |
|
|
| HotKeyIt wrote: | | Code: | Backup:=ClipboardAll
Clipboard=
Send ^c
ClipWait,0.2
List:=Clipboard
ClipBoard:=Backup
Loop,Parse,List,`n,`r
Run print %A_LoopField% |
|
that works for .txt files... however, for a specific extension .STL it says:
no application is associated with the specified file for this operation
but when i double click the .stl file, it opens right up..
thanks almost there  |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Mar 18, 2010 7:05 pm Post subject: |
|
|
Can ur STL file print without opening the file?
for example, txt and images can do this directly while Word doc need to open up first then print |
|
| Back to top |
|
 |
joey3002
Joined: 18 Mar 2010 Posts: 36
|
Posted: Thu Mar 18, 2010 7:07 pm Post subject: |
|
|
| Anonymous wrote: | Can ur STL file print without opening the file?
for example, txt and images can do this directly while Word doc need to open up first then print |
correct, I need to open them in the application. I cant right click and print. |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Mar 18, 2010 7:14 pm Post subject: |
|
|
ok, that means u can use "Run print %A_LoopField%" to default print the file
back to the open file, ^p press enter method |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Mar 18, 2010 7:15 pm Post subject: |
|
|
| can't* |
|
| Back to top |
|
 |
joey3002
Joined: 18 Mar 2010 Posts: 36
|
Posted: Thu Mar 18, 2010 7:31 pm Post subject: |
|
|
But how do I open the file to issue the ^p
say the program that i use is called, xyz.exe
thanks |
|
| Back to top |
|
 |
Another Guest Guest
|
Posted: Thu Mar 18, 2010 7:42 pm Post subject: |
|
|
Have you tried: | Code: | | RunWait, print %currentPath%\%file% |
|
|
| Back to top |
|
 |
joey3002
Joined: 18 Mar 2010 Posts: 36
|
Posted: Thu Mar 18, 2010 7:51 pm Post subject: |
|
|
| Another Guest wrote: | Have you tried: | Code: | | RunWait, print %currentPath%\%file% |
|
just tried, same error.. |
|
| Back to top |
|
 |
joey3002
Joined: 18 Mar 2010 Posts: 36
|
Posted: Fri Mar 19, 2010 2:09 am Post subject: |
|
|
| joey3002 wrote: | | Another Guest wrote: | Have you tried: | Code: | | RunWait, print %currentPath%\%file% |
|
just tried, same error.. |
can anyone help me? I guess I need to open the application, then issue the ^p?
thanks |
|
| Back to top |
|
 |
|