Advertisement
Hollowyearz

DMS Helper1.6

Nov 28th, 2013
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 6.74 KB | None | 0 0
  1. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  2. #AutoIt3Wrapper_icon=Autoit\icon26.ico
  3. #AutoIt3Wrapper_Compression=4
  4. #AutoIt3Wrapper_Res_Comment=DMS Macros
  5. #AutoIt3Wrapper_Res_Description=Gives usage to F1 - F11 keys
  6. #AutoIt3Wrapper_Res_Fileversion=1.0.0.0
  7. #AutoIt3Wrapper_Run_Tidy=y
  8. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
  9. #cs ----------------------------------------------------------------------------
  10.  
  11.     AutoIt Version: 3.3.0.0
  12.     Author:         Bill Hall
  13.  
  14.     Script Function:
  15.     DMS h8r Macroset - Gives macro Function to the F1 - F11 keyz
  16.  
  17. #ce ----------------------------------------------------------------------------
  18.  
  19.  
  20. #include<Date.au3>
  21. #include<IE.au3>
  22. #include <GUIConstantsEx.au3>
  23.  
  24.  
  25. Global $Paused
  26. HotKeySet("{F1}", "_help")
  27. HotKeySet("^{F1}", "_helpp")
  28. HotKeySet("{F2}", "_screenshot")
  29. HotKeySet("^{F2}", "_screenshotp")
  30. HotKeySet("{F3}", "_scan")
  31. HotKeySet("{F4}", "_date")
  32. HotKeySet("^{F4}", "_datey")
  33. HotKeySet("{F5}", "_searchap")
  34. HotKeySet("{F6}", "_csearchp")
  35. HotKeySet("{F7}", "_tab2mask")
  36. HotKeySet("{F8}", "_savefrommask")
  37. HotKeySet("{F9}", "_f9textpaste")
  38. HotKeySet("^{F9}", "_createf9text")
  39. HotKeySet("{F10}", "_f10textpaste")
  40. HotKeySet("^{F10}", "_createf10text")
  41. HotKeySet("{F11}", "_snowmail")
  42. HotKeySet("^{F11}", "_createf11text")
  43.  
  44.  
  45.  
  46. While 1
  47.     Sleep(28800)
  48. WEnd
  49.  
  50.  
  51. ;F1
  52. Func _help() ;===> Opens DMSPlus...Working!!
  53.  
  54. If WinExists("DMS Plus") Then
  55.     MsgBox(0, "DMS", "Already Open", 1)
  56.     WinActivate("DMS Plus")
  57.     Return 0
  58. Else
  59.     Send("^+d")
  60.  
  61. WinWaitActive("Login")
  62. Sleep(1000)
  63. Send("{ENTER}")
  64. EndIf
  65.  
  66. EndFunc   ;==>_help
  67. ;Ctrl & F1
  68. Func _helpp()
  69. WinActivate("DMS Plus")
  70. WinWaitActive("DMS Plus")
  71. Sleep(300)
  72. ControlClick("DMS Plus", "", "[CLASS:Button; TEXT:Finish]")
  73.  
  74. EndFunc   ;==>_helpp
  75. ;F2
  76. Func _screenshot()
  77.  
  78. Run("T:\Gruenstadt\Picture Service\Viewer\i_view32.exe /capture=2")
  79.  
  80. EndFunc   ;==>_screenshot
  81.  
  82. ;Ctrl & F2
  83. Func _screenshotp()
  84.  
  85.     Run("T:\Gruenstadt\Picture Service\Viewer\i_view32.exe /capture=2")
  86.     WinWaitActive("IrfanView")
  87.     Send("^p")
  88.     WinWaitActive("Print Preview")
  89.     ControlClick("Print Preview", "", "[CLASS:Button; INSTANCE:21]");portrait
  90.     ControlClick("Print Preview", "", "[CLASS:Button; INSTANCE:5]");custom print size
  91.     ControlClick("Print Preview", "", "[CLASS:Button; INSTANCE:7]");aspect ratio
  92.     GUICtrlSetState("Button7", $GUI_CHECKED)
  93.     ControlSetText("Print Preview", "", "Edit1", "14")
  94.     ControlSetText("Print Preview", "", "Edit2", "9.25")
  95.     ControlClick("Print Preview", "", "[CLASS:Button; INSTANCE:14]");print
  96.     Send("!{F4}")
  97.  
  98. EndFunc   ;==>_screenshotp
  99.  
  100. ;F3
  101. Func _scan()
  102.  
  103.     Run("T:\Gruenstadt\Picture Service\Viewer\i_view32.exe")
  104.     WinWaitActive("IrfanView")
  105.     Send("^+a")
  106.     WinActivate("Acquire/Batch Scanning - Setup", "")
  107.     Send("{ENTER}")
  108.  
  109.  
  110. EndFunc   ;==>_scan
  111. ;F4
  112. Func _date()
  113.  
  114.     Send(_NowDate())
  115.  
  116.  
  117. EndFunc   ;==>_date
  118. ;Ctrl & F4
  119. Func _datey()
  120.  
  121.     $NowDate = _DateAdd('d', -1, _NowCalcDate())
  122.     $sNewDate = _DateTimeFormat($NowDate, 2)
  123.  
  124.     Send($sNewDate)
  125.  
  126.  
  127. EndFunc   ;==>_datey
  128. ;F5
  129. Func _searchap()
  130.  
  131. If WinExists("DMS Plus") Then
  132.     WinActivate("DMS Plus", "")
  133.     Send("!c")
  134.     Send("{ENTER}")
  135.     Send("f")
  136.     If WinExists("DMS Plus", "Customer Lookup") Then
  137.         MsgBox(0, "debug", "Customer Lookup", 1)
  138.         EndIf
  139.     Send("{TAB}")
  140.     Send("{ENTER}")
  141.     Send("+{TAB}")
  142.         Return 0
  143.     Else
  144.     _help()
  145.     WinWaitActive("DMS Plus", "")
  146.     Send("!c")
  147.     Send("{ENTER}")
  148.     Send("f")
  149.     Send("{TAB}")
  150.     Send("{ENTER}")
  151.     Send("+{TAB}")
  152. EndIf  
  153.  
  154.  
  155.  
  156. EndFunc   ;==>_searchap
  157. ;F6
  158. Func _csearchp() ;copy search paste
  159.  
  160.     Send("^c") ;CTRL C - copies number
  161. If WinExists("DMS Plus") Then
  162.     WinActivate("DMS Plus", "")
  163.     Send("!c")
  164.     Send("{ENTER}")
  165.     Send("f")
  166. Else
  167.     _openandDMS()  
  168. EndIf
  169.  
  170. If WinExists("DMS Plus", "Customer Lookup") Then
  171.     ;Msgbox(0, "debug", "Customer Lookup", 1)
  172.     Send("+{TAB}")
  173. ElseIf WinExists("DMS Plus", "Search Results") Then
  174.     ;Msgbox(0, "debug", "Customer Lookup", 1)
  175.     Send("{TAB}")
  176.     Send("{ENTER}")
  177. EndIf  
  178.  
  179.     Sleep(1000)
  180.     Send("^v")
  181.     Send("{ENTER}")
  182.     Return 0
  183.    
  184.  
  185.  
  186. EndFunc   ;==>_csearchp
  187. ;F7
  188. Func _openandDMS()
  189.     _help()
  190.     WinWaitActive("DMS Plus", "")
  191.     Send("!c")
  192.     Send("{ENTER}")
  193.     Send("f")
  194.     Send("+{TAB}")
  195. ;~  Send("{ENTER}")
  196.     Sleep(1000)
  197.     Send("^v")
  198.     Send("{ENTER}")
  199. EndFunc
  200. Func _tab2mask()
  201.  
  202.     Send("{ENTER}")
  203.     Send("{TAB 21}") ;hit tab button 21 times to get to the delivery info mask
  204.     Sleep(500)
  205.     Send("{END}") ;to get to the end of any text already there
  206.  
  207.  
  208. EndFunc   ;==>_tab2mask
  209. ;F8
  210. Func _savefrommask()
  211.  
  212.     Send("{TAB 10}") ;hit tab button 21 times to get to the delivery info mask
  213.     Send("{ENTER}") ;save and closes
  214.  
  215.  
  216.  
  217. EndFunc   ;==>_savefrommask
  218. ;F9
  219. Func _f9textpaste()
  220.  
  221.     $macrof9 = WinGetText("f9.txt", "")
  222.     Send($macrof9) ;enter text from f9.txt file
  223.  
  224. EndFunc   ;==>_f9textpaste
  225. ;Ctrl & F9
  226. Func _createf9text()
  227.  
  228.     Run("notepad.exe")
  229.     WinWaitActive("Untitled - Notepad")
  230.     Send("Type your text here for the F9 button.")
  231.     Send("^s")
  232.     Send("f9.txt")
  233.     Send("!s")
  234.     Send("y")
  235.  
  236.  
  237. EndFunc   ;==>_createf9text
  238. ;F10
  239. Func _f10textpaste()
  240.  
  241.     $macrof10 = WinGetText("f10.txt", "")
  242.     Send($macrof10) ;enter text from f10.txt file
  243.  
  244. EndFunc   ;==>_f10textpaste
  245. ;Ctrl & F10
  246. Func _createf10text()
  247.  
  248.     Run("notepad.exe")
  249.     WinWaitActive("Untitled - Notepad")
  250.     Send("Type your text here for the F10 button.")
  251.     Send("^s")
  252.     Send("f10.txt")
  253.     Send("!s")
  254.     Send("y")
  255.  
  256.  
  257. EndFunc   ;==>_createf10text
  258. ;F11
  259. Func _snowmail()
  260.  
  261.     Send("^c") ;CTRL C - copies number
  262.     Send("{ESC}") ;closes DMS mask
  263.     WinActivate("Inbox - Microsoft Outlook", "")
  264.     Send("^n")
  265.     Send("^v")
  266.     Send("!u")
  267.     Send("Culligan Delivery Cancelled due to Adverse Weather Conditions")
  268.     Send("{TAB}")
  269.     Send("Dear Culligan Customer,")
  270.     Send("{ENTER}")
  271.     Send("{ENTER}")
  272.     Send("    We regret to inform you that due to the extreme weather and adverse road conditions we are unable to complete normal deliveries to your area.")
  273.     Send("    We sincerely apologize for any inconvenience this may have caused and thank you for understanding and sharing our safety concerns for our drivers.")
  274.     Send("{ENTER}")
  275.     Send("{ENTER}")
  276.     Send("    As the road conditions allow, we suggest getting water at your local Shoppette to tide you over until we can get back to our normal delivery cycle as it will be impossible to do any make up deliveries.  Weather permitting, we will be able to continue normal route cycles in time for your next  delivery.")
  277.     Send("{ENTER}")
  278.     Send("{ENTER}")
  279.     Send("Best regards,")
  280.     Send("{ENTER}")
  281.     Send("Bill")
  282.     Sleep(1000)
  283.     Send("^{ENTER}")
  284.  
  285. EndFunc   ;==>_f11textpaste
  286. ;Ctrl & F11
  287. Func _createf11text()
  288.  
  289.     Run("notepad.exe")
  290.     WinWaitActive("Untitled - Notepad")
  291.     Send("Type your text here for the F11 button.")
  292.     Send("^s")
  293.     Send("f11.txt")
  294.     Send("!s")
  295.     Send("y")
  296.  
  297.  
  298. EndFunc   ;==>_createf11text
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement