Leaderboard
Popular Content
Showing content with the highest reputation on 04/29/2017 in all areas
-
Back to my roots- Thank you AutoIT Community!
Realm and 2 others reacted to QuickWhiteWolf for a topic
Hi everyone, I was previously a member of this forum under the username Wombat. It's been years and multiple email accounts closed since then so I decided to start fresh and take a moment to thank you all... (Admins/Mods let me know if we need to discuss this...) I started programming with AutoIT while working as a scrap catcher for a machine that chopped scrap into pieces for easier moving, I learned styles and gained strengths from some of the best members on this forum by reverse engineering their code. I gained the confidence of our IT manager by making a boast that I could write an application to replace a p.o.s. cobalt based app we were using on the floor at that time, needless to say I was way in over my head but he saw that I had potential and I luckily had built several other apps on the side that were of equal or greater value to the company. I've been working as help-desk for the past 3 years and writing software as well to facilitate the help desk and solve recurring issues with our users. I was given an office and moved out of help-desk about a year ago, after 5 years of hard work I've actually landed the title of Jr. Developer moving into mid level title/pay this year! The company has already set out an improvement path that sees me with 4 certs and a bachelors in 4 more years making great money. Before this I had only ever worked at gas stations, fast food and manual labor jobs. If you're ever worried about your life, want something more, or just want a change you can do it. It's not easy, not at all, but it's possible and software programming is a very rewarding field if you like to make things and see how others interact with them. I utilized AutoIT to bring a company into the twenty-first century, away from paper trails and sticky notes improving the quality of life for the employees on the floor (where I started before learning AutoIT). I was given the go ahead to purchase visual studio and I learned VB.Net and built an awesome piece of Zebra labeling software (Utilizing ZPL code translated froma graphical editor) for our shipping department. Now I'm diving head first into C# and we have another programmer on board as we move on to MS Team Services and begin to tackle a sweet new project involving real time awareness of our product on the factory floor utilizing RFID and windows 10 tablets. That's a long way to come in just 4 years, and I couldn't have done it without the gigantic heart this community has and the mentorship provided for people looking to get into programming. So from the bottom of my heart, with immense respect.... Thank you so much AutoIT community3 points -
Hey guys! Here are some informations on how to automate AS400 tasks with AutoIT. AS400 are mainframes made by IBM and used mainly in professional workplaces. First you need to launch an IBM Iseries console to the AS400. It looks like this: As it is a regular window, you can use the "AutoIT Window Info" tool and functions like "ControlSetText", "ControlClick" to automate the login process. Notice that the name of the window (in the top left of the above screenshot) is "Session A". This is because it is the first Iseries window that is opened on the client computer. If you do not close it and open another one, the next one will be named "Session B". The third one "Session C"... Once you're logged into the Iseries console interface, the OS400 login window shows up: Use this code to create an autoIT object linked to the iseries console: global $oOIA = ObjCreate("PCOMM.autECLOIA") $oOIA.SetconnectionByName("A") global $oPS = ObjCreate("PCOMM.autECLPS") $oPS.SetConnectionByName("A") The letter "A" is a reference to the name of the session displayed in the iseries console window, as explained before. Change it to another letter if you have multiples iseries console windows opened at the same time. Then there are 3 main functions that you can use to interact with the interface: $oOIA.WaitForInputReady() ;waits for the interface to be ready for input. $oPS.SetCursorPos(6, 53) ;put the cursor of the interface to position X = 6, Y = 53 $oPS.SendKeys("hello world[enter]") ;write the text "hello world" where the cursor of the interface is then press the enter/return key $result = $oPS.SearchText("banana") ;search for the text "banana" on the interface screen. Returns "True" if found, "False" if not. The function "WaitForInputReady" is badfully not very reliable. For better results, use the fuction "SearchText" in a while loop to wait for a specific text to appear on the interface if you want to be sure that the interface is ready for input. With these 3 functions you can pretty much do anything you would do manually on an Iseries console. Special keys for the "SendKeys" function can be found using the virtual keyboard included in the iseries console software. Enjoy Original post (credit to @DangerousDan and @bwochinski) for helping me understand the above stuff ^^):2 points
-
Unfortunately this wouldn't tell you if it's successful or not, its better to get the exit code. The following UDF by @TheDcoder is great for this, I've used it for cmd, exe, msi installations, it works really well. All credit to TheDcoder.2 points
-
Command line
antonioj84 reacted to Subz for a topic
$step3Cmd = "d:\ClientAdmin\RetailPatch\retailPatch.bat storeregister r07v06 stop-pos-and-change-N" Run(@Comspec & " /c " & $step3Cmd) Or ShellExecute(@Comspec, $step3Cmd)1 point -
SOLVED: Embed 2 IE Browsers in 1 Gui
Phoenixx177 reacted to kylomas for a topic
Phoenixx177, Try something like this... #include <GuiConstantsEx.au3> #include <windowsconstants.au3> #include <IE.au3> Global $oIE_google = _IECreateEmbedded() Global $oIE_autoit = _IECreateEmbedded() Global $hGUI = GUICreate("Embedded Web control Test", 1280, 780, (@DesktopWidth - 1280) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN, $WS_MAXIMIZEBOX)) Global $google = GUICtrlCreateObj($oIE_google, 10, 10, 1100, 300) Global $autoit = GUICtrlCreateObj($oIE_autoit, 10, 350, 1100, 300) _IENavigate($oIE_google, "http://www.google.com") _IENavigate($oIE_autoit, "http://www.autoitscript.com") GUISetState() While GUIGetMsg() <> -3 WEnd kylomas1 point -
As a programmer using the language you don't need to know the underlying working of built-in functions and you shouldn't even care. I don't care whether MsgBox() uses Windows UI primitives, draws the thing directly by writing in the graphics card memory or even employs an army of underpaid chinese workers to raise or hide microscopic red, green and blue flags. All I want is the function to have clear specifications and consistent behavior suitable for my use cases and nothing else. Now what issue(s) do you experience with those functions?1 point
-
Try this one then? I've added removal of -A attribute and as you notice all the files in Content.IE5 have that attribute. Should work #Include <File.au3> _DirRemoveContents(@UserProfileDir & '\Local Settings\Temporary Internet Files\Content.IE5') Func _DirRemoveContents($folder) Local $list_of_contents, $status $list_of_contents = _FileListToArray($folder) If IsArray($list_of_contents) Then If StringRight($folder, 1) <> "\" Then $folder = $folder & "\" If @error = 1 Then Return 1 ; No Files\Folders Found For $a = 1 To $list_of_contents[0] FileSetAttrib($folder & "\" & $list_of_contents[$a], "-RASH") If StringInStr(FileGetAttrib($folder & $list_of_contents[$a]), "D") Then $status = DirRemove($folder & $list_of_contents[$a], 1) Else $status = FileDelete($folder & $list_of_contents[$a]) EndIf Next Else Return 2 ; Directory doesn't exists EndIf EndFunc ;==>_DirRemoveContents1 point