Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/12/2019 in all areas

  1. Using _Excel_RangeCopyPaste copies to the clipboard so you would need to ClipGet() to obtain the information. What you probably want to use is _Excel_RangeRead, you can then use this within a loop (Only if you use more than 1 cell, if you only point it at A1 for example it will only return the string not an array). Correct me if I'm wrong but "eClinicalWorks (Garcia,Erick )" is a third-party program, if so, using the Autoit WIndow Info Tool (installed with Autoit), point it at "eClinicalWorks (Garcia,Erick )" and get the Control id information, then use ControlSend to send the data to each field. Just for reference, in your code above you would need to move the "Next" below the line "if $testarray[$i]=..." otherwise it wouldn't loop, although as I mentioned above it wouldn't work because you were copying the data to clipboard so the "For $i = 0 To Ubound($testarray[$i]) - 1" wouldn't work as the latter wasn't an array.
    1 point
  2. I think your problem resides in that line : Local $testarray = _Excel_RangeCopyPaste($oWorkBook.Activesheet,"A1") If you read the help file : Success: the object of the target range if $vTargetRange <> Default, else 1. So in all situations, the return value is NOT an array. It is either an object or the value 1. In your case it is the value 1. And like @Earthshine said you should try to eliminate all send () commands and use the functions inside the UDF. PS. winactivate () with an object is an error. If you test the result, you will see it...
    1 point
  3. Jenkins runs as a service on session 0. That means that some window states will not occur like when you run on a user session. Example, windows will never be active, so send () and winwaiactive won't work. Use controlclick instead.
    1 point
  4. Deye

    Calculator

    Hi, I have removed and disabled WindowsStore apps (whatever done .. got the calculator removed as well) Happy, if any one willing to put this up or recommend of a good free simple calculator Edit : Never mind just found a windows 7 calculator installer (did the trick for me ..) Thanks Deye
    1 point
  5. So if you dont got admin rights you cannot use BlockInput() that's all. But this is the only way for me to do what you want. An other simple way to disable a windows without block anyinput is a brain thing. You can move the windows out of the screen but it wont be displayed. Somthing like : WinMove ( $hWND , "" , -1000 , -1000 )  An other way ( Advanced skill ) would be to use : #include <WinAPI.au3> With some others macro. But unfortunatly we 're not learning this on the forum since it can make malicius things.
    1 point
  6. After many trial and error, reading all documents - I have successfully parse all of these into Autoit code. I post the code for reference and anyone who needed. Global Const $xlFixedWidth=2 Global Const $xlTextQualifierDoubleQuote=1 Global $Array[7] = [1, 1, 1, 1, 1, 1, 1] Global $Array2[6] = [14, 16, 17, 18, 16, 14] With $oExcel.ActiveSheet .QueryTables.Add("TEXT;" & $Where, $oExcel.ActiveSheet.Range("$A$1")) .QueryTables(1).Name = "Data" .QueryTables(1).FieldNames = True .QueryTables(1).RowNumbers = False .QueryTables(1).FillAdjacentFormulas = False .QueryTables(1).PreserveFormatting = True .QueryTables(1).RefreshOnFileOpen = False .QueryTables(1).RefreshStyle = $xlInsertDeleteCells .QueryTables(1).SavePassword = False .QueryTables(1).SaveData = True .QueryTables(1).AdjustColumnWidth = True .QueryTables(1).RefreshPeriod = 0 .QueryTables(1).TextFilePromptOnRefresh = False .QueryTables(1).TextFilePlatform = 437 .QueryTables(1).TextFileStartRow = 1 .QueryTables(1).TextFileParseType = $xlFixedWidth .QueryTables(1).TextFileTextQualifier = $xlTextQualifierDoubleQuote .QueryTables(1).TextFileConsecutiveDelimiter = False .QueryTables(1).TextFileTabDelimiter = True .QueryTables(1).TextFileSemicolonDelimiter = False .QueryTables(1).TextFileCommaDelimiter = False .QueryTables(1).TextFileSpaceDelimiter = False .QueryTables(1).TextFileColumnDataTypes = $Array .QueryTables(1).TextFileFixedColumnWidths = $Array2 .QueryTables(1).TextFileTrailingMinusNumbers = True .QueryTables(1).Refresh EndWith
    1 point
  7. Already found a way to make it work! $TextBody $HTMLBody ;replace $as_Body with a text and html body $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $TextBody, $HTMLBody, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl) ;add the new $TextBody and $HTMLBody to the $rc string Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_TextBody = "", $as_HTMLBody = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance="Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0) ;also add them both to the _InetCOM ;Replace in the _InetCOM: If StringInStr($as_Body,"<") and StringInStr($as_Body,">") Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf ;With: $objEmail.HTMLBody = $as_HTMLBody $objEmail.Textbody = $as_TextBody & @CRLF
    1 point
  8. Melba23

    GUI child

    myspacee, This is one way to do it - disable the parent GUI when the child GUI is visible: #include <GUIConstantsEx.au3> ; Create parent $hGUI = GUICreate("Parent", 500, 500) $hButton_Child = GUICtrlCreateButton("Child", 10, 10, 80, 30) $hButton_Test = GUICtrlCreateButton("Test", 10, 50, 80, 30) GUISetState() ; Create child $hGUI_Child = GUICreate("Child", 200, 200) GUISetState(@SW_HIDE) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hButton_Test MsgBox(0, "Test", "You pressed the button!") Case $hButton_Child GUISetState($GUI_DISABLE, $hGUI) GUISetState(@SW_SHOW, $hGUI_Child) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUISetState(@SW_HIDE, $hGUI_Child) GUISetState($GUI_ENABLE, $hGUI) ExitLoop EndSwitch WEnd EndSwitch WEndTry pressing the Test button when the child is visible! M23
    1 point
×
×
  • Create New...