Jump to content

Pantera975

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by Pantera975

  1. Maybe you could use RunAs() RunAs("Local_Admin_Account", @ComputerName, "PASSWORD_1", 0, "C:\Path\to\Your_other\autoit_program.exe", @SystemDir)
  2. Might I suggest _IsPressed and ControlSend as a way to start?
  3. You can ctrlsend an ALT + F4 to that pop up. Or you can use ProcessClose() to just kill it as you would in task manager. (This will only work if you have no other IE's open)
  4. Maybe this will work? $oDELbtn = _IEGetObjById($oForm,"confirm_delete_btn")
  5. I assume there is more code above this that you have defined $oIE. If that is true then try the following below. Sometimes the source that autoit gets is kinda funky. Try this and see if its what you expect. $sText = String(_IEBodyReadText ($oIE)) $NoRecs = StringInStr($sText, "No records found for this account.") msgbox(-1,"",$sText) msgbox(-1,"",$NoRecs) If $NoRecs <> 0 Then "do stuff" Else EndIf
  6. Exactly what are you trying to accomplish? I doubt you will need note pad. Are you just trying to log the sessions?
  7. I thought this seemed familiar http://www.autoitscript.com/forum/index.php?showtopic=100265&view=&hl=&fromsearch=1
  8. I caught it pretty quick by just pushing alt. When I saw what it was doing I just started randomly pushing buttons to see what they do and ALT seems to stop it. I checked to see if it was a hotkey and its not.. strange..
  9. I'm not too sure exactly what you are looking to do.. I'm assuming check a text box or something? Do sleep(20) Until $oRemedyForm.GetField <> ""
  10. A VM will get the pixel providing you turn the screen saver off. Your actual desktop will get the screen saver if you let it go on. I dealt with this for awhile. Its a pain. VM's are the way to go. Also just a side note. If you remote desktop to a VM and then close the Remote desktop session. It will lock the computer and halt your script. The way I do it is install Logmein on the VM and access it that way. Then when you close LogMein it will not lock the computer and your scripts will run. Great for botting sites.
  11. $oIE = _IECreate ("https://www.google.com", 0, 1) Do $sHTML = _IEBodyReadHTML ($oIE) if StringInStr($sHTML,'<DIV id=status style="DISPLAY: block">') Then $x = 1 Else $x = 0 EndIf until $x=1
  12. Just so you know.. this will go to the next page as soon as its done loading.. you may want to put a sleep so you can read it. $oIE = _IECreate ("https://www.google.com", 0, 1) _IENavigate ($oIE, "http://www.yahoo.com") _IENavigate ($oIE, "http://www.hotmail.com") _IENavigate ($oIE, "http://www.gmail.com")
  13. the help file has tutorials exactly like this. Check out the winzip one that is in the help file. (search winzip) ; Run the winzip installer Run("winzip90.exe") ; Initial Setup Screen WinWaitActive("WinZip® 9.0 SR-1 Setup", "&Setup") Send("!s") ; Install location WinWaitActive("WinZip Setup", "into the following folder") Send("{ENTER}") ; Features overview WinWaitActive("WinZip Setup", "WinZip features include") Send("!n") ; License agreement WinWaitActive("License Agreement") Send("!y") ; Quick start WinWaitActive("WinZip Setup", "Quick Start Guide") Send("!n") ; Choose interface WinWaitActive("WinZip Setup", "switch between the two interfaces") Send("!c") Send("!n") ; Installation type (custom/express) WinWaitActive("WinZip Setup", "&Express setup (recommended)") Send("!e") Send("!n") ; Select file associations WinWaitActive("WinZip Setup", "WinZip needs to associate itself with your archives") Send("!n") ; Completed installation screen WinWaitActive("WinZip Setup", "Thank you for installing this evaluation version") Send("{ENTER}") ; Wait for winzip to load then close it WinWaitActive("WinZip (Evaluation Version)") WinClose("WinZip (Evaluation Version)")
  14. #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 If _IsPressed("11", $dll) Then Do mouseclick("left") sleep(100) until _IsPressed("12", $dll) EndIf WEnd DllClose($dll) Ctrl will start it and alt will stop it.
  15. I'm guessing it may not be possible to go to next empty row? Nobody has posted an answer and I can't find anything online.
  16. I got alot done on the code... Thanks for the excel info PsaltyDS I am having new problems now. I need the code to write the info to next open row. (If the top 354 rows have something in them then go to row 355) ;Release spreadsheet update ;Adam Fowler ;10-26-2007 ;GUI interface to update spreadsheet for release Process #include <GuiConstants.au3> #include <array.au3> #include <ExcelCOM_UDF.au3> ; Include the collection ; GUI GuiCreate("Release Status update", 280, 400) GuiSetIcon(@SystemDir & "\clipbrd.exe", 0) ; LABEL Environment GuiCtrlCreateLabel("Environment", 10, 15, 120, 15) ; COMBO Environment $Environment = GuiCtrlCreatecombo("", 10, 30, 120, 100) GUICtrlSetData(-1,"ENG|SaturnIDMS|WPS Internal|Legacy","Environment") ; LABEL Developer GuiCtrlCreateLabel("Developer", 150, 15, 120, 15) ; COMBO Developer $Developer = GuiCtrlCreatecombo("", 150, 30, 120, 100) GUICtrlSetData(-1,"Pramer|Fryman|Mathes|Flaute|Schmidt|Carter|Kirchner|Hoeve|Carter|Dahlinghaus","Developer") ; LABEL Deployer GuiCtrlCreateLabel("Deployer", 150, 65, 120, 15) ; COMBO Deployer $Deployer = GuiCtrlCreatecombo("", 150, 80, 120, 100) GUICtrlSetData(-1,"Strawser|Schmidt|Fowler|Mathes|Denslow","Deployer") ; LABEL Status GuiCtrlCreateLabel("Status", 150, 115, 120, 15) ; COMBO Production Deploy status $Status = GuiCtrlCreatecombo("", 150, 130, 120, 100) GUICtrlSetData(-1,"Canceled|Complete|Open|Successful","Status") ; LABEL Area GuiCtrlCreateLabel("Area", 10, 65, 120, 15) ; COMBO Area $Area = GuiCtrlCreatecombo("", 10, 80, 120, 100) GUICtrlSetData(-1,"CM|eBusiness|Internal","Area") ; LABEL Application GuiCtrlCreateLabel("Application", 10, 115, 120, 15) ; COMBO Application $Application = GuiCtrlCreatecombo("", 10, 130, 120, 100) GUICtrlSetData(-1,"AutoMark|BASIS|BPM|CCR|CM|CommonCust|CTI|CustomerFirst|ENG|eSupport|FADD|FastTrac|FICO|PriceBook |ReySource|RUOnlone","Application") ; Name $Name = GuiCtrlCreateInput("", 10, 180, 120, 20) ; LABEL Name GuiCtrlCreateLabel("Name", 10, 165, 120, 15) ; Notes $Notes = GuiCtrlCreateInput("", 150, 180, 120, 20) ; LABEL Notes GuiCtrlCreateLabel("Notes", 150, 165, 120, 15) ; Number $Number = GuiCtrlCreateInput("", 10, 230, 120, 20) GuiCtrlCreateLabel("Version", 10, 215, 120, 15) ; Test $TestDate = GuiCtrlCreateDate("", 10, 270, 200, 20) GuiCtrlCreateLabel("Test", 220, 270, 25, 20) ; Prod $ProdDate = GuiCtrlCreateDate("", 10, 310, 200, 20) GuiCtrlCreateLabel("Prod", 220, 310, 25, 20) ;Radio Buttons $Testradio = GuiCtrlCreateRadio("", 250, 260, 80) GuiCtrlSetState(-1, $GUI_CHECKED) $Prodradio = GuiCtrlCreateRadio("", 250, 300, 80) ;Save $Save = GUICtrlCreateButton("Save", 10, 350, 50) GUICtrlSetState(-1, $GUI_FOCUS); the focus is on this button ;Search $Search = GUICtrlCreateButton("Search", 80, 350, 50) ;Clear $Clear = GUICtrlCreateButton("Clear", 150, 350, 50) ;Exit $Exit = GUICtrlCreateButton("Exit", 220, 350, 50) Global $sString, $aLineArray, $aSplit, $nCount $sString = FileRead("C:\Documents and Settings\FowlerAd\Desktop\CSV.csv") ;Create an array of each line $aLineArray = StringSplit(StringStripCR($sString), @LF) ; GUI MESSAGE LOOP GuiSetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Save; click Save If GUICtrlRead($Area) = "" then MsgBox(0, "Error", "Please fill out Area") EndIf [b] ; Open new book, make it invisible Local $oExcel = _ExcelBookOpen("C:\Documents and Settings\FowlerAd\Desktop\temp78.xls",0,False);1 = visable 0 = invisable _ExcelWriteCell($oExcel, GUICtrlRead($Environment),2, 1) _ExcelWriteCell($oExcel, GUICtrlRead($Area), 2, 2) _ExcelWriteCell($oExcel, GUICtrlRead($Application), 2, 3) _ExcelWriteCell($oExcel, GUICtrlRead($Name), 2, 4) _ExcelWriteCell($oExcel, GUICtrlRead($Number), 2, 5) If GUICtrlRead($Testradio) = 1 Then _ExcelWriteCell($oExcel, GUICtrlRead($TestDate), 2, 6) EndIf If GUICtrlRead($Prodradio) = 1 Then _ExcelWriteCell($oExcel, GUICtrlRead($ProdDate), 2, 7) EndIf _ExcelWriteCell($oExcel, GUICtrlRead($Developer), 2, 8) _ExcelWriteCell($oExcel, GUICtrlRead($Deployer), 2, 9) _ExcelWriteCell($oExcel, GUICtrlRead($Status), 2, 10) _ExcelWriteCell($oExcel, GUICtrlRead($Notes), 2, 11) ; Now we save it into the directory; overwrite existing file if necessary _ExcelBookSaveAs($oExcel, "" & "C:\Documents and Settings\FowlerAd\Desktop\temp78.xls", "xls", 0, 1) ; And finally we close out _ExcelBookClose($oExcel)[/b] Case $Search; click Search MsgBox(0, "Click", "Search") Case $Clear; Click clear GuiCtrlSetData($Environment,"") GUICtrlSetData($Area,"") GUICtrlSetData($Area, "CM|eBusiness|Internal","Area") GUICtrlSetData($Application,"") GUICtrlSetData($Application,"AutoMark|BASIS|BPM|CCR|CM|CommonCust|CTI|CustomerFirst|ENG|eSupport|FADD|FastTrac|FICO|PriceBook |ReySource|RUOnlone","Application") GUICtrlSetData($Name,"") GuiCtrlSetData($Number,"") GUICtrlSetData($Developer,"") GUICtrlSetData($Developer,"Pramer|Fryman|Mathes|Flaute|Schmidt|Carter|Kirchner|Hoeve|Carter|Dahlinghaus","Developer") GUICtrlSetData($Deployer,"") GUICtrlSetData($Deployer,"Strawser|Schmidt|Fowler|Mathes|Denslow","Deployer") GUICtrlSetData($Status,"") GuiCtrlSetData($Notes,"") Case $Exit; Click Exit Exit EndSwitch WEnd
  17. Tahnks for the Excel stuff. I used what I could.. Still stuck ;Release spreadsheet update ;Adam Fowler ;10-26-2007 ;GUI interface to update spreadsheet for release Process #include <GuiConstants.au3> #include <array.au3> #include <ExcelCOM_UDF.au3> ; Include the collection ; GUI GuiCreate("Release Status update", 280, 400) GuiSetIcon(@SystemDir & "\clipbrd.exe", 0) ; LABEL Environment GuiCtrlCreateLabel("Environment", 10, 15, 120, 15) ; COMBO Environment $Environment = GuiCtrlCreatecombo("", 10, 30, 120, 100) GUICtrlSetData(-1,"ENG|SaturnIDMS|WPS Internal|Legacy","Environment") ; LABEL Developer GuiCtrlCreateLabel("Developer", 150, 15, 120, 15) ; COMBO Developer $Developer = GuiCtrlCreatecombo("", 150, 30, 120, 100) GUICtrlSetData(-1,"Pramer|Fryman|Mathes|Flaute|Schmidt|Carter|Kirchner|Hoeve|Carter|Dahlinghaus","Developer") ; LABEL Deployer GuiCtrlCreateLabel("Deployer", 150, 65, 120, 15) ; COMBO Deployer $Deployer = GuiCtrlCreatecombo("", 150, 80, 120, 100) GUICtrlSetData(-1,"Strawser|Schmidt|Fowler|Mathes|Denslow","Deployer") ; LABEL Status GuiCtrlCreateLabel("Status", 150, 115, 120, 15) ; COMBO Production Deploy status $Status = GuiCtrlCreatecombo("", 150, 130, 120, 100) GUICtrlSetData(-1,"Canceled|Complete|Open|Successful","Status") ; LABEL Area GuiCtrlCreateLabel("Area", 10, 65, 120, 15) ; COMBO Area $Area = GuiCtrlCreatecombo("", 10, 80, 120, 100) GUICtrlSetData(-1,"CM|eBusiness|Internal","Area") ; LABEL Application GuiCtrlCreateLabel("Application", 10, 115, 120, 15) ; COMBO Application $Application = GuiCtrlCreatecombo("", 10, 130, 120, 100) GUICtrlSetData(-1,"AutoMark|BASIS|BPM|CCR|CM|CommonCust|CTI|CustomerFirst|ENG|eSupport|FADD|FastTrac|FICO|PriceBook |ReySource|RUOnlone","Application") ; Name $Name = GuiCtrlCreateInput("", 10, 180, 120, 20) ; LABEL Name GuiCtrlCreateLabel("Name", 10, 165, 120, 15) ; Notes $Notes = GuiCtrlCreateInput("", 150, 180, 120, 20) ; LABEL Notes GuiCtrlCreateLabel("Notes", 150, 165, 120, 15) ; Number $Number = GuiCtrlCreateInput("", 10, 230, 120, 20) GuiCtrlCreateLabel("Version", 10, 215, 120, 15) ; Test $TestDate = GuiCtrlCreateDate("", 10, 270, 200, 20) GuiCtrlCreateLabel("Test", 220, 270, 200, 20) ; Prod $ProdDate = GuiCtrlCreateDate("", 10, 310, 200, 20) GuiCtrlCreateLabel("Prod", 220, 310, 200, 20) ;Save $Save = GUICtrlCreateButton("Save", 10, 350, 50) GUICtrlSetState(-1, $GUI_FOCUS); the focus is on this button ;Search $Search = GUICtrlCreateButton("Search", 80, 350, 50) ;Clear $Clear = GUICtrlCreateButton("Clear", 150, 350, 50) ;Exit $Exit = GUICtrlCreateButton("Exit", 220, 350, 50) Global $sString, $aLineArray, $aSplit, $nCount $sString = FileRead("C:\Documents and Settings\FowlerAd\Desktop\CSV.csv") ;Create an array of each line $aLineArray = StringSplit(StringStripCR($sString), @LF) ; GUI MESSAGE LOOP GuiSetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit [b] Case $Save; click Save ; Open new book, make it invisible Local $oExcel = _ExcelBookNew(0) _ExcelWriteCell GUICtrlRead($Developer),1,1) ; Now we save it into the directory; overwrite existing file if necessary _ExcelBookSaveAs($oExcel, "" & "C:\Documents and Settings\FowlerAd\Desktop\temp78.xls", "xls", 0, 1) ; And finally we close out _ExcelBookClose($oExcel)[/b] Case $Search; click Search MsgBox(0, "Click", "You clicked Search!") Case $Clear; Click clear MsgBox(0, "Click", "You clicked Clear!") Case $Exit; Click Exit Exit EndSwitch WEnd The bold part.. makes a new book and ATTEMPTS to save the value of $Developer into it... What I need is to open C:\Documents and Settings\FowlerAd\Desktop\temp78.xls and put the data in the next available lin e in the next available line in the right order $Area|$Application|$Name|$Number|$TestDate|$ProdDate|$Developer|$Deployer|$Status|$Notes
  18. I guess you mis understood when I said I don't care. I used a .CSV just as a trial. I don't know what will be easiest. As of right now the information is in a .xls Area|Application|Name|Number|Test date|Production Date|Developer|Deployer|Status|Notes **There will not always be notes** The reason I don't care how the file is saved is because I wanted to make it easier on anyone who helped me. If they think Saving as .Xls or .Dat or .CSV would work better I was leaving that option available. Idealy I would like it to read from the .xls I would like it to save to a .xls in the order described above. But if someone neglects to put in anything EXCEPT NOTES AND PROD DATE then msg box would tell them to complete all fields Also can you make Date fields blank to start? instead of showing todays date?
  19. I have a few questions. I've migrated to AutoIt from VB and its very similar and very different in ways. I have made this program that will help me keep track of releases that I do at work. Here is what I need it to do. 1. Fill in information in Text boxes and combo boxes and click save. 2. Saves all information into a file.(I don't care how or what kind) 3. If Any box is empty EXCEPT NOTES then Msg box with "Fill in all fields" 3. If you fill in just a few boxes then click search then it will bring up anything in that file that matches all of the things you put in EXCEPT DATE. 4. If more then 1 exist use a 2D grid array and show all matching. 5. Clear obviously clears all boxes. I've tried a few ways with arrays and such that I've found on other forums but they don't seem to work for what I need. I can import the entire CSV.csv file but not put them into the individual boxes and combos. ;Release spreadsheet update ;Adam Fowler ;10-26-2007 ;GUI interface to update spreadsheet for release Process #include <GuiConstants.au3> #include <array.au3> ; GUI GuiCreate("Release Status update", 280, 400) GuiSetIcon(@SystemDir & "\clipbrd.exe", 0) ; LABEL Environment GuiCtrlCreateLabel("Environment", 10, 15, 120, 15) ; COMBO Environment GuiCtrlCreatecombo("", 10, 30, 120, 100) GUICtrlSetData(-1,"ENG|SaturnIDMS|WPS Internal|Legacy","Environment") ; LABEL Developer GuiCtrlCreateLabel("Developer", 150, 15, 120, 15) ; COMBO Developer GuiCtrlCreatecombo("", 150, 30, 120, 100) GUICtrlSetData(-1,"Pramer|Fryman|Mathes|Flaute|Schmidt|Carter|Kirchner|Hoeve|Carter|Dahlinghaus","Developer") ; LABEL Deployer GuiCtrlCreateLabel("Deployer", 150, 65, 120, 15) ; COMBO Deployer GuiCtrlCreatecombo("", 150, 80, 120, 100) GUICtrlSetData(-1,"Strawser|Schmidt|Fowler|Mathes|Denslow","Deployer") ; LABEL Status GuiCtrlCreateLabel("Status", 150, 115, 120, 15) ; COMBO Production Deploy status GuiCtrlCreatecombo("", 150, 130, 120, 100) GUICtrlSetData(-1,"Canceled|Complete|Open|Successful","Status") ; LABEL Area GuiCtrlCreateLabel("Area", 10, 65, 120, 15) ; COMBO Area GuiCtrlCreatecombo("", 10, 80, 120, 100) GUICtrlSetData(-1,"CM|eBusiness|Internal","Area") ; LABEL Application GuiCtrlCreateLabel("Application", 10, 115, 120, 15) ; COMBO Application GuiCtrlCreatecombo("", 10, 130, 120, 100) GUICtrlSetData(-1,"AutoMark|BASIS|BPM|CCR|CM|CommonCust|CTI|CustomerFirst|ENG|eSupport|FADD|FastTrac|FICO|PriceBook |ReySource|RUOnlone","Application") ; Name GuiCtrlCreateInput("", 10, 180, 120, 20) ; LABEL Name GuiCtrlCreateLabel("Name", 10, 165, 120, 15) ; Notes GuiCtrlCreateInput("", 150, 180, 120, 20) ; LABEL Notes GuiCtrlCreateLabel("Notes", 150, 165, 120, 15) ; Number GuiCtrlCreateInput("", 10, 230, 120, 20) GuiCtrlCreateLabel("Version", 10, 215, 120, 15) ; Test GuiCtrlCreateDate("", 10, 270, 200, 20) GuiCtrlCreateLabel("Test", 220, 270, 200, 20) ; Prod GuiCtrlCreateDate("", 10, 310, 200, 20) GuiCtrlCreateLabel("Prod", 220, 310, 200, 20) ;Save $Save = GUICtrlCreateButton("Save", 10, 350, 50) GUICtrlSetState(-1, $GUI_FOCUS); the focus is on this button ;Search $Search = GUICtrlCreateButton("Search", 80, 350, 50) ;Clear $Clear = GUICtrlCreateButton("Clear", 150, 350, 50) ;Exit $Exit = GUICtrlCreateButton("Exit", 220, 350, 50) Global $sString, $aLineArray, $aSplit, $nCount $sString = FileRead("C:\Documents and Settings\FowlerAd\Desktop\CSV.csv") ;Create an array of each line $aLineArray = StringSplit(StringStripCR($sString), @LF) ; GUI MESSAGE LOOP GuiSetState() While GuiGetMsg() <> $GUI_EVENT_CLOSE While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $Exit;Click Exit Exit Case $msg = $GUI_EVENT_CLOSE Or $msg = $Save;click Save MsgBox(0, "Click","You clicked Save!") Case $msg = $GUI_EVENT_CLOSE Or $msg = $Search;click Search MsgBox(0, "Click", "You clicked Search!") Case $msg = $GUI_EVENT_CLOSE Or $msg = $Clear; Click clear MsgBox(0, "Click", "You clicked Clear!") EndSelect WEnd GUIDelete() Exit WEnd
×
×
  • Create New...