Jherrera Posted March 6, 2018 Share Posted March 6, 2018 Honestly I’m new to these forums ... I’m not sure if this is the right place ... I’ve used auto it before like over 10 years ago with a bot to automate playing a game for me ... I honestly don’t remember anything or how I did it ... but what I’m trying to do is automate printing PDFs ... I need it to switch from grayscale to color every other print ... so like print 1 color 1 grayscale 1 color 1 grayscale 1 color 1 grayscale 1 color 1 grayscale then pause for 5 min switch pdf repeat pause again switch pdf repeat ... reason for this is I’m printing on clear labels and If I don’t do it this way it bleeds and printer gets too hot ... so I can load the paper into the printer ... label blank sheet label blank sheet and so on but it would help me if I can automate this ... even if I can’t get it to switch to grayscale that would be fine ... thanks any help is appreciated Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 6, 2018 Moderators Share Posted March 6, 2018 Jherrera, Welcome to the AutoIt forums. As this is not exactly a "super geeky" question I have moved it to GH&S - now you know where to post next time! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Jherrera Posted March 6, 2018 Author Share Posted March 6, 2018 8 minutes ago, Melba23 said: Jherrera, Welcome to the AutoIt forums. As this is not exactly a "super geeky" question I have moved it to GH&S - now you know where to post next time! M23 Sorry about that ... I’m a noob all over again ... even tho I used to know all this autoit/vb/c++ ... I just can’t remember any of it anymore ... but now I’m trying to relearn it all ... but if u guys can bear with me I’m sure it will all come back to me just like how I just relearned html and posting on forums lol ... thanks! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 6, 2018 Moderators Share Posted March 6, 2018 Jherrera, No problem. But as you mentioned using AutoIt in the past to create "a bot to automate playing a game", you might like to familiarise yourself with the current Forum rules so you keep on the right side of them nowadays. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Jherrera Posted March 6, 2018 Author Share Posted March 6, 2018 5 minutes ago, Melba23 said: Jherrera, No problem. But as you mentioned using AutoIt in the past to create "a bot to automate playing a game", you might like to familiarise yourself with the current Forum rules so you keep on the right side of them nowadays. M23 Oh definitely... that was over 10 years ago ... I don’t even have time to play games anymore ... that was just how I learned about autoit ... I remembered about it and thought hey this could do what I need to do I just need some guidance on it ... all that other stuff is in the past ... I downloaded and installed autoit and it looks so different to me ... I just can’t figure it out Link to comment Share on other sites More sharing options...
Bilgus Posted March 6, 2018 Share Posted March 6, 2018 (edited) Edited March 6, 2018 by Bilgus Link to comment Share on other sites More sharing options...
xcaliber13 Posted March 6, 2018 Share Posted March 6, 2018 I print pdf files daily. Here is what works for me. #include <File.au3> Global $sFilePath = "Path To Your PDF Files\*.pdf" Local $iFileExists = FileExists($sFilePath) If $iFileExists Then $selectedfolder = "Path To Your PDF Files" $aFileList = _FileListToArray($selectedfolder, "*", $FLTA_FILES) ;This Step Prints the PDF Files. For $i = 1 To $aFileList[0] Run('C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe') Sleep (3000) Send("!fo") Sleep (3000) WinActive("Open") Send("Path To Your PDF Files\"& $aFileList[$i]) Sleep(2000) Send("{ENTER}") Sleep(4000) ControlClick("Open", "", "[CLASS:Button; INSTANCE:1]", "Left", 1, 33, 13) Sleep(2000) Send("!fp") Sleep(2000) WinActive("Print") ControlClick("Print", "", "[CLASS:Button; INSTANCE:48]", "Left", 1, 41, 14) Sleep(12000) Send("!fx") Sleep(3000);Set Sleep to how much time you need between printing files Next EndIF You will need to have Acrobat Reader installed. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now