Hello,
I have a script that plays wav files that exist in the same directory as the script, using soundPlay().
Is there any way I can embed these wav files into the script, so that when I compile it to an EXE, no external files are required?
Hello,
I have a script that plays wav files that exist in the same directory as the script, using soundPlay().
Is there any way I can embed these wav files into the script, so that when I compile it to an EXE, no external files are required?
Hi,
First of All, I am new with autoit and trying to get some functions down.
I am making an automatic clean process, its running clean programs and control the clicks with controlclick.
Now after i have run System ninja i want to read the result and write it in to a log, but cant find a function to read someting in an external program.
Can some one give me a push in the right direction?
$TITLE = "System Ninja" $SUB = "100%" $TITLE = "Scan For Junk" $SUB = "Files Found"
Hey all:)
I´ve tried... many things.
But im not good enough... yet!
Im trying to delete a selected set of Value&Key from an ini file.
It seems like an easy thing to do, but i cant make it work.
Here is what i´ve got.... Its a part of a much larger program, but its all you need.
(i know that, connect to server and ping does not Work either.
you can make your own ini or use this:
[Servers]
MKNSRVTRAPEZE02=10.5.12.70
google.com=216.58.209.110
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <ListViewConstants.au3> #include <GuiListView.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> ;Global $hGuiAddServer = 9999 ; Dummystring Local $aServers = IniReadSection (@ScriptDir & "\Servers.ini", "Servers") ; Create Main GUI and TabControl $Form1 = GUICreate("IT Tools", 365, 553,@DesktopWidth - 380,@DesktopHeight - 1195) $PageControl1 = GUICtrlCreateTab(8, 8, 350, 539) ; Servers Tab------------------------------------------------------------------------------------------------------------------------ $Servers = GUICtrlCreateTabItem("Servers") $listview_srv = GUICtrlCreateListView("Server|IP", 20, 49, 222, 482, $LVS_SINGLESEL,$LVS_EX_GRIDLINES+$LVS_SORTDESCENDING) _GuiCtrlListView_SetColumnWidth($listview_srv,0,130) _GuiCtrlListView_SetColumnWidth($listview_srv,1,88) ;_GUICtrlListView_HideColumn($listview_srv, 2) GetServers() $btn_srv_AddServer = GUICtrlCreateButton("Add Server", 252, 51, 92, 25) GUICtrlSetOnEvent(-1, "AddServer") $btn_srv_RemoveServer = GUICtrlCreateButton("Remove Server", 252, 81, 94, 25) GUICtrlSetOnEvent(-1, "RemoveServer") $btn_srv_RefreshList = GUICtrlCreateButton("Refresh List", 252, 113, 94, 25) GUICtrlSetOnEvent(-1, "RefreshServer") $btn_srv_Connect = GUICtrlCreateButton("Connect", 252, 145, 94, 25) GUICtrlSetOnEvent(-1, "ConnectToServer") $btn_srv_Ping = GUICtrlCreateButton("Ping", 252, 178, 94, 25) GUICtrlSetOnEvent(-1, "PingServer") ; Main GUI Control------------------------------------------------------------------------------------------------------------------- GUICtrlSetFont(-1, 8, 400, 0, "Arial") GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $btn_srv_AddServer addServer() Case $btn_srv_RefreshList RefreshServer() Case $btn_srv_RemoveServer RemoveServer() Case $btn_srv_Connect ConnectToServer() Case $btn_srv_Ping PingServer() EndSwitch WEnd ; Add Server ------------------------------------------------------------------------------------------------------------------ Func addServer () $hGuiAddServer = GUICreate ("Add Server", 100, 100, 100, 100) $NewServer = InputBox ("Add Server","Please type hostename","","","","",@DesktopWidth - 1100,@DesktopHeight - 800,"",$hGuiAddServer) TCPStartup() $ipAddress = TCPNameToIP ($NewServer) TCPShutdown() if Not $NewServer="" Then IniWrite (@ScriptDir & "\Servers.ini", "Servers", $NewServer, $ipAddress) EndIf While 2 $sMsg = GUIGetMsg($NewServer) Switch $sMsg Case $GUI_EVENT_CLOSE GUICtrlDelete($hGuiAddServer) EndSwitch ExitLoop WEnd _GUICtrlListView_DeleteAllItems($listview_srv) $sItem_srv = GUICtrlRead(GUICtrlRead($listview_srv)) GetServers() EndFunc ; Remove Server -------------------------------------------------------------------------------------------------------------------- Func RemoveServer() Local $sItem_srv = GUICtrlRead(GUICtrlRead($listview_srv)) Local $iniRead = IniReadSection (@ScriptDir & "\Servers.ini", "Servers") ;MsgBox (0, "",""&$sItem_srv&"") if not @error Then For $i = 1 To $iniRead[0][0] MsgBox (0,"List Hosts","Hostname: " & $iniRead[$i][0] & @CRLF & "IP: " & $iniRead[$i][1]) Next EndIf ;IniDelete ("C:\it\Servers.ini","Servers",$sItem_srv) _GUICtrlListView_DeleteAllItems($listview_srv) $sItem_srv = GUICtrlRead(GUICtrlRead($listview_srv)) GetServers() EndFunc ; Connect to Server --------------------------------------------------------------------------------------------------------------- Func ConnectToServer() $sItem_srv = GUICtrlRead(GUICtrlRead($listview_srv)) if $sItem_srv = "" Then MsgBox(0, "Connect to Server or Host","Please choose a host") Else $Host = StringSplit($sItem_srv,"|",1) MsgBox(0,"",$Host) ShellExecute("mstsc.exe","/admin /v "&$sItem_srv) EndIf EndFunc ; Refresh Serverlist ------------------------------------------------------------------------------------------------------------- Func RefreshServer() _GUICtrlListView_DeleteAllItems($listview_srv) $sItem_srv = GUICtrlRead(GUICtrlRead($listview_srv)) GetServers() EndFunc ; Get Servers from ini file -------------------------------------------------------------------------------------------------- Func GetServers() Local $aServers = IniReadSection (@ScriptDir & "\Servers.ini", "Servers") If Not @error Then For $i = 1 To $aServers[0][0] GUICtrlCreateListViewItem($aServers[$i][0] & '|' & $aServers[$i][1], $listview_srv) ;GUICtrlSetOnEvent(-1, '_ListViewHandler') Next EndIf EndFunc ; Ping Server -------------------------------------------------------------------------------------------------- Func PingServer() $sItem_srv = GUICtrlRead(GUICtrlRead($listview_srv)) $sItem_srv = StringTrimRight($sItem_srv, 3) Local $iPing = Ping ($sItem_srv) ShellExecute("C:\Windows\System32\cmd.exe",$iPing) EndFunc
Im loosing my hair!!
Hi,
first attempt at script to install software. i can get past the 1st window ok but no matter what option i use, be it mouseclick, controlclick, send function, nothing progresses past the second window.
I have tried various forms of trying to recognise the window but have been unable to progress. I dont know if it because of brackets in the title but trying to select active window, or doing partial title doesnt resolve
Hello.
I have email message in outlook. And i need to take screenshot of the entire message. But content does not fit on the screen and scrolling occurs. I can not figure out how to make a screenshot with scrolling.
MouseWheel() is not a choise. Because it is hard to find out border for subsequent gluing screenshots together.
Is it possible to scroll down the content for a certain number of pixels?
I work with outlook through the COM. Here goes code:
$msg_width = 800 $msg_height = 900 $o = ObjCreate("Outlook.Application") $folder = $o.GetNamespace("MAPI").Folders.Item(2).Folders.Item(1) ; navigate to specific folder $email = $folder.Items(2) ; take email message from store $item.Display() ; show message in window $message_window = WinGetHandle("[CLASS:rctrl_renwnd32]", "Сообщение") WinMove($message_window, "", 0, 0, $msg_width, $msg_height) $control = ControlGetHandle($win_list[$i][1], "", "[CLASS:Internet Explorer_Server]") ; ??? $item.Close(1)
Screenshot: http://i.imgur.com/EofobJs.png
Whenever I load a file initially, everything is just fine. The problem arises when I wish to select another file.....
Problem 1: Upon selecting another file, if I interact with the listview, it causes the data to disappear.
Problem 2: Not only does the data disappear; but, if I have different headers in my csv, that gets all jacked-up as well.
NOTE: This only occurs when pressing the button "Load File".
Code:
#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Compression=4 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <file.au3> #include <GUIConstantsEx.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> #include <Array.au3> #include <ComboConstants.au3> #include <GuiComboBox.au3> #include <StaticConstants.au3> Global $a_csv Global $listview Global $checkboxName Global $iCount Global $runProg Global $acheck Global $mapColumn Global $runProg Global $selectInstrument Global $selectFile Global $s_Path Global $sampleInputBox ;Global $iLVStyle = BitOR($LVS_REPORT, $LVS_SHOWSELALWAYS) ;Global $iLVExtStyle = BitOR($WS_EX_CLIENTEDGE, $LVS_EX_GRIDLINES, $LVS_EX_CHECKBOXES, $LVS_EX_FULLROWSELECT) Global $selectAll Global $clearAll $s_Path = FileOpenDialog("Select CVS File", @ScriptDir, "comma seperated values (*.csv)") If @error Then MsgBox(4096, "", "No File(s) chosen") Exit Else _FileReadToArray($s_Path, $a_csv) buildGUI() EndIf Func buildGUI() Local $sDrive, $sDir, $sFilename, $sExtension _PathSplit($s_Path,$sDrive, $sDir, $sFilename, $sExtension) GUICreate("THOTH - Auto File Name Creator for Instrument", 900, 450, -1, -1) ;$listview = GUICtrlCreateListView(StringReplace($a_csv[1], ",", "|"), 10, 10, 400, 210,$iLVStyle,$iLVExtStyle) $listview = GUICtrlCreateListView(StringReplace($a_csv[1], ",", "|"), 10, 10, 400, 210) GUICtrlCreateLabel("Select a sample file:", 450, 40, 200) $sampleInputBox = GUICtrlCreateInput($sFilename&$sExtension,450,60,180,20) $loadNewFile = GUICtrlCreateButton("Load File", 450, 85) GUICtrlCreateLabel("Select an instrument:", 700, 40, 200) $selectInstrument = GUICtrlCreateCombo("", 700, 60, 180, 25) GUICtrlSetData(-1, "dummy|TGA-100|TGA-200|AUTOCAT-100|AUTOCAT-200") $checkboxName = StringSplit($a_csv[1], ",") $iCount = $checkboxName[0] ;creating buttons $runProg = GUICtrlCreateButton("Run Program", 530, 175, 250, 50) GUICtrlSetState($runProg, $GUI_DISABLE) ;$selectAll = GUICtrlCreateButton("Select All", 300, 230, 100, 30) ;$clearAll = GUICtrlCreateButton("Clear All", 300, 270, 100, 30) ;Building the checkboxes DYNAMICALLY....may need to switch to forced checkbox name ;Store controIDs of the checkboxes Global $aCheck[$iCount + 1] Global $mapColumn[$iCount + 1] For $j = 1 To $iCount $aCheck[$j] = GUICtrlCreateCheckbox($checkboxName[$j], 10, 190 + (50 * $j), 100, 30) GUICtrlSetState($aCheck[$j], $GUI_UNCHECKED) Next For $i = 2 To UBound($a_csv) - 1 $s_temp = StringReplace($a_csv[$i], ",", "|") GUICtrlCreateListViewItem($s_temp, $listview) Next Global $aOut[''][''] For $i = 2 to $a_csv[0] $aLine = stringsplit($a_csv[$i] , ",",3) If ubound($aLine) > ubound($aOut , 2) Then redim $aOut[$i][ubound($aLine)] _ArrayAdd($aOut , $a_csv[$i] , 0 , ",") Next Local $idCancelbutton = GUICtrlCreateButton("Exit", 700, 400, 180, 30) GUISetState(@SW_SHOW) ;GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $runProg If GUICtrlRead($selectInstrument) <> "" Then copyToInput() Else MsgBox(0, "", "Select and Instrument") EndIf Case $loadNewFile _loadNewFile() GUICtrlSetState($runProg, $GUI_DISABLE) Case $GUI_EVENT_CLOSE, $idCancelbutton ExitLoop Case Else For $i = 1 To $iCount If $msg = $aCheck[$i] Then If GUICtrlRead($msg) = 1 Then GUICtrlSetState($runProg, $GUI_ENABLE) Else GUICtrlSetState($runProg, $GUI_DISABLE) EndIf ExitLoop EndIf Next EndSwitch WEnd GUIDelete() EndFunc Func _loadNewFile() Local $sDrive, $sDir, $sFilename, $sExtension $selectFile = FileOpenDialog("Select a file with a sample list...", @ScriptDir, "Text (*.csv;*.txt)") If @error Then MsgBox(4096, "", "No File(s) chosen") Else cleanListview() _PathSplit($selectFile,$sDrive, $sDir, $sFilename, $sExtension) GUICtrlSetData($sampleInputBox, $sFilename & $sExtension) _FileReadToArray($selectFile,$a_csv) $listview = GUICtrlCreateListView(StringReplace($a_csv[1], ",", "|"), 10, 10, 400, 210) For $i = 2 To UBound($a_csv) - 1 $s_temp = StringReplace($a_csv[$i], ",", "|") GUICtrlCreateListViewItem($s_temp, $listview) Next $checkboxName = StringSplit($a_csv[1], ",") $iCount = $checkboxName[0] For $j = 1 To $iCount $aCheck[$j] = GUICtrlCreateCheckbox($checkboxName[$j], 10, 190 + (50 * $j), 100, 30) GUICtrlSetState($aCheck[$j], $GUI_UNCHECKED) Next EndIf EndFunc Func copyToInput() Select Case GUICtrlRead($selectInstrument) = "dummy" $textPos_1 = 4 $buttonClick_1 = 6 $buttonClick_2 = 2 $title_1 = "HPOV" $title_2 = "Job" Case GUICtrlRead($selectInstrument) = "TGA-100" $textPos_1 = 1161 $buttonClick_1 = 1152 $title_1 = "(METTLER) - TGA-100A with gas box" Case GUICtrlRead($selectInstrument) = "TGA-200" $textPos_1 = 1161 $buttonClick_1 = 1152 $title_1 = "(METTLER) - TGA-200A with gas box" Case GUICtrlRead($selectInstrument) = "AUTOCAT-100" $textPos_1 = 4 $buttonClick_1 = 6 $title_1 = "HPOV" Case GUICtrlRead($selectInstrument) = "AUTOCAT-200" $textPos_1 = 1161 $buttonClick_1 = 1152 $title_1 = "FIND AUTOCAT-200 NAME!" EndSelect $allRows = _GUICtrlListView_GetItemCount($listview) Local $iState = WinGetState($title_1) ;ConsoleWrite($iState) If BitAND($iState,1) <> 1 then MsgBox(0, "Application Not Open", "Make sure the instrument application" & @CRLF & "window is open...") Else For $rows = 0 to $allRows-1 $material_name = _GUICtrlListView_GetItem($listview, $rows, 0) $letter = _GUICtrlListView_GetItem($listview, $rows, 3) If GUICtrlRead($aCheck[1]) <> 1 and GUICtrlRead($aCheck[4]) <> 1 then continueloop If GUICtrlRead($aCheck[1]) = 1 Then controlsettext($title_1, "", $textPos_1, $material_name[3]) EndIf #cs - 2nd input box If GUICtrlRead($aCheck[4]) = 1 Then controlsettext($title, "", $textPos_2, $letter[3]) endif #ce controlclick($title_1, "", $buttonClick_1) Sleep(2000) ;there you can put some sleep(5000) = 5seconds, more or less, if u know exact applications processing time for this operation ;or ControlGetText("Myapplication title", "", CONTROL_WHICH_CHANGES_AFTER_BUTTONPRESS) and compare to older reads If IsDeclared("title_2") and IsDeclared("buttonClick_2") Then controlclick($title_2, "", $buttonClick_2) Sleep(2000) EndIf ;there you can put some sleep(5000) = 5seconds, more or less, if u know exact applications processing time for this operation ;or ControlGetText("Myapplication title", "", CONTROL_WHICH_CHANGES_AFTER_BUTTONPRESS) and compare to older reads If msgbox(1,"", "You Shall Not Pass!" & @CRLF & "Ok actually you can, just press something") = 2 then ExitLoop EndIf Next EndIf EndFunc Func cleanListview() _GUICtrlListView_DeleteAllItems($listview) For $i = 1 To $iCount GUICtrlDelete($acheck[$i]) Next EndFunc
Sample CSV1:
material_name,material_alias,period,letter HT-000001333,,r1,C7 dummy1,,,C8 dummy2,,,D1 dummy3,,,D2 dummy4,,,D3 dummy5,,,D4 RS-000001336,,r2,D5 dummy7,,,D6
Sample CSV2:
Building,Room,Network Building1,Room1,Network_Path1 Building2,Room2,Network_Path2 Building3,Room3,Network_Path3 Building4,Room4,Network_Path4 Building5,Room5,Network_Path5
Thanks again AutoIT Community!
Tim
The ability to controlsettext should be limited to those items that are checked inside of the listview. If they aren't checked, they don't get get sent.... only the ones that are checked get sent.
Where/how do I incorporate that logic?
I know I am suppose to use "_GUICtrlListView_GetItemChecked" (or at least I think I am), but all the variations of IF statements and locations that I have tried has me stumped.
#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Compression=4 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <file.au3> #include <GUIConstantsEx.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> #include <Array.au3> #include <ComboConstants.au3> #include <GuiComboBox.au3> #include <StaticConstants.au3> Global $a_csv Global $listview Global $checkboxName Global $iCount Global $runProg Global $acheck Global $mapColumn Global $runProg Global $selectInstrument Global $selectFile Global $s_Path Global $sampleInputBox Global $iLVStyle = BitOR($LVS_REPORT, $LVS_SHOWSELALWAYS) Global $iLVExtStyle = BitOR($WS_EX_CLIENTEDGE, $LVS_EX_GRIDLINES, $LVS_EX_CHECKBOXES, $LVS_EX_FULLROWSELECT) Global $Form1 Global $selectAll Global $clearAll $s_Path = FileOpenDialog("Select CVS File", @ScriptDir, "comma seperated values (*.csv)") If @error Then MsgBox(4096, "", "No File(s) chosen") Exit Else _FileReadToArray($s_Path, $a_csv) buildGUI() EndIf Func buildGUI() Local $sDrive, $sDir, $sFilename, $sExtension _PathSplit($s_Path,$sDrive, $sDir, $sFilename, $sExtension) $Form1 = GUICreate("THOTH - Auto File Name Creator for Instrument", 900, 450, -1, -1) $listview = GUICtrlCreateListView(StringReplace($a_csv[1], ",", "|"), 10, 10, 400, 210,$iLVStyle,$iLVExtStyle) ;$listview = GUICtrlCreateListView(StringReplace($a_csv[1], ",", "|"), 10, 10, 400, 210) GUICtrlCreateLabel("Select a sample file:", 450, 40, 200) $sampleInputBox = GUICtrlCreateInput($sFilename&$sExtension,450,60,180,20) $loadNewFile = GUICtrlCreateButton("Load File", 450, 85) GUICtrlCreateLabel("Select an instrument:", 700, 40, 200) $selectInstrument = GUICtrlCreateCombo("", 700, 60, 180, 25) GUICtrlSetData(-1, "dummy|TGA-100|TGA-200|AUTOCAT-100|AUTOCAT-200") $checkboxName = StringSplit($a_csv[1], ",") $iCount = $checkboxName[0] ;creating buttons $runProg = GUICtrlCreateButton("Run Program", 530, 175, 250, 50) GUICtrlSetState($runProg, $GUI_DISABLE) $selectAll = GUICtrlCreateButton("Select All", 300, 230, 100, 30) $clearAll = GUICtrlCreateButton("Clear All", 300, 270, 100, 30) ;Building the checkboxes DYNAMICALLY....may need to switch to forced checkbox name ;Store controIDs of the checkboxes Global $aCheck[$iCount + 1] Global $mapColumn[$iCount + 1] For $j = 1 To $iCount $aCheck[$j] = GUICtrlCreateCheckbox($checkboxName[$j], 10, 190 + (50 * $j), 100, 30) GUICtrlSetState($aCheck[$j], $GUI_UNCHECKED) Next For $i = 2 To UBound($a_csv) - 1 $s_temp = StringReplace($a_csv[$i], ",", "|") GUICtrlCreateListViewItem($s_temp, $listview) Next Global $aOut[''][''] For $i = 2 to $a_csv[0] $aLine = stringsplit($a_csv[$i] , ",",3) If ubound($aLine) > ubound($aOut , 2) Then redim $aOut[$i][ubound($aLine)] _ArrayAdd($aOut , $a_csv[$i] , 0 , ",") Next Local $idCancelbutton = GUICtrlCreateButton("Exit", 700, 400, 180, 30) GUISetState(@SW_SHOW) ;GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $runProg If GUICtrlRead($selectInstrument) <> "" Then copyToInput() Else MsgBox(0, "", "Select and Instrument") EndIf Case $selectAll _LVChkBx(True, True) Case $clearAll _LVChkBx(False, True) Case $loadNewFile _loadNewFile() GUICtrlSetState($runProg, $GUI_DISABLE) Case $GUI_EVENT_CLOSE, $idCancelbutton ExitLoop Case Else For $i = 1 To $iCount If $msg = $aCheck[$i] Then If GUICtrlRead($msg) = 1 Then GUICtrlSetState($runProg, $GUI_ENABLE) Else GUICtrlSetState($runProg, $GUI_DISABLE) EndIf ExitLoop EndIf Next EndSwitch WEnd GUIDelete() EndFunc Func _LVChkBx($f_Check, $f_All) Local $hLV = ControlGetHandle($Form1, "", $ListView) Local $iCnt If $f_All Then _GUICtrlListView_SetItemChecked($hLV, -1, $f_Check) Else $iCnt = ControlListView($Form1, "", $hLV, "GetItemCount") For $n = 0 To $iCnt - 1 If ControlListView($Form1, "", $hLV, "IsSelected", $n) Then _GUICtrlListView_SetItemChecked($hLV, $n, $f_Check) Next EndIf EndFunc ;==>_LVChkBx Func _loadNewFile() Local $sDrive, $sDir, $sFilename, $sExtension $selectFile = FileOpenDialog("Select a file with a sample list...", @ScriptDir, "Text (*.csv;*.txt)") If @error Then MsgBox(4096, "", "No File(s) chosen") Else cleanListview() _PathSplit($selectFile,$sDrive, $sDir, $sFilename, $sExtension) GUICtrlSetData($sampleInputBox, $sFilename & $sExtension) _FileReadToArray($selectFile,$a_csv) ;$listview = GUICtrlCreateListView(StringReplace($a_csv[1], ",", "|"), 10, 10, 400, 210) $listview = GUICtrlCreateListView(StringReplace($a_csv[1], ",", "|"), 10, 10, 400, 210,$iLVStyle,$iLVExtStyle) For $i = 2 To UBound($a_csv) - 1 $s_temp = StringReplace($a_csv[$i], ",", "|") GUICtrlCreateListViewItem($s_temp, $listview) Next $checkboxName = StringSplit($a_csv[1], ",") $iCount = $checkboxName[0] For $j = 1 To $iCount $aCheck[$j] = GUICtrlCreateCheckbox($checkboxName[$j], 10, 190 + (50 * $j), 100, 30) GUICtrlSetState($aCheck[$j], $GUI_UNCHECKED) Next EndIf EndFunc Func copyToInput() Select Case GUICtrlRead($selectInstrument) = "dummy" $textPos_1 = 4 $buttonClick_1 = 6 $buttonClick_2 = 2 $title_1 = "HPOV" $title_2 = "Job" Case GUICtrlRead($selectInstrument) = "TGA-100" $textPos_1 = 1161 $buttonClick_1 = 1152 $title_1 = "(METTLER) - TGA-100A with gas box" Case GUICtrlRead($selectInstrument) = "TGA-200" $textPos_1 = 1161 $buttonClick_1 = 1152 $title_1 = "(METTLER) - TGA-200A with gas box" Case GUICtrlRead($selectInstrument) = "AUTOCAT-100" $textPos_1 = 4 $buttonClick_1 = 6 $title_1 = "HPOV" Case GUICtrlRead($selectInstrument) = "AUTOCAT-200" $textPos_1 = 1161 $buttonClick_1 = 1152 $title_1 = "FIND AUTOCAT-200 NAME!" EndSelect $allRows = _GUICtrlListView_GetItemCount($listview) Local $iState = WinGetState($title_1) ;ConsoleWrite($iState) If BitAND($iState,1) <> 1 then MsgBox(0, "Application Not Open", "Make sure the instrument application" & @CRLF & "window is open...") Else For $rows = 0 to $allRows-1 $material_name = _GUICtrlListView_GetItem($listview, $rows, 0) $letter = _GUICtrlListView_GetItem($listview, $rows, 3) If GUICtrlRead($aCheck[1]) <> 1 and GUICtrlRead($aCheck[4]) <> 1 then continueloop If GUICtrlRead($aCheck[1]) = 1 Then controlsettext($title_1, "", $textPos_1, $material_name[3]) EndIf #cs - 2nd input box If GUICtrlRead($aCheck[4]) = 1 Then controlsettext($title, "", $textPos_2, $letter[3]) endif #ce controlclick($title_1, "", $buttonClick_1) Sleep(2000) ;there you can put some sleep(5000) = 5seconds, more or less, if u know exact applications processing time for this operation ;or ControlGetText("Myapplication title", "", CONTROL_WHICH_CHANGES_AFTER_BUTTONPRESS) and compare to older reads If IsDeclared("title_2") and IsDeclared("buttonClick_2") Then controlclick($title_2, "", $buttonClick_2) Sleep(2000) EndIf ;there you can put some sleep(5000) = 5seconds, more or less, if u know exact applications processing time for this operation ;or ControlGetText("Myapplication title", "", CONTROL_WHICH_CHANGES_AFTER_BUTTONPRESS) and compare to older reads If msgbox(1,"", "You Shall Not Pass!" & @CRLF & "Ok actually you can, just press something") = 2 then ExitLoop EndIf Next EndIf EndFunc Func cleanListview() GUICtrlDelete($listview) ;_GUICtrlListView_DeleteAllItems($listview) For $i = 1 To $iCount GUICtrlDelete($acheck[$i]) Next EndFunc
Thanks,
Tim
Hi Guys! I'm totally new to scripting and this software might as well be in a foreign language. I don't see anything telling me even where to start. Here's what I need to do:
Run a report in Quickbooks, then save that report into 4 different folders on my network. I would like to schedule it to happen 3 times per day. I thought I could do it with a mouse recorder...
Any help/guidance/advice would be appreciated.
Thanks,
Denise
I'm doing some tests with the "Magnifier Functions udf" by Ascend4nt.
Here is a draft for a magnifying glass.
#include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPISys.au3> #include <Misc.au3> ; ; http://www.autoitscript.com/forum/topic/161193-magnifier-functions-windows-vista-magnifier-manipulation/ ; _MagnifierInit() ; ; ; If false, magnifies the portion of screen that lies behind lens (behind the window) Global $iLensMode = 2 ; 0 = magnifies what's around the mouse into the lens. The lens stays where it was placed ; 1 = magnifies what's around the mouse into the lens. The lens follows the mouse ; 2 = magnifies the portion of screen that lies behind the lens. The lens stays where it was placed ; $aTemp = _MagnifierGUICreate($iWinWidth, $iWinHeight, 10, 10, 0, 0) GUISetStyle($WS_POPUPWINDOW, BitOR($WS_EX_LAYERED, $WS_EX_DLGMODALFRAME, $WS_EX_CLIENTEDGE), $hMagnifyGUI) ; modify lens aspect ; Global $aLensDim = WinGetClientSize($hMagnifyCtrl) ; a 2-element array containing the following information: ; $aLensDim[0] = Width of window's client area (inner area excluding borders). ; $aLensDim[1] = Height of window's client area (inner area excluding borders). $idPic = GUICtrlCreatePic("", 0, 0, $aLensDim[0], $aLensDim[1], -1, $GUI_WS_EX_PARENTDRAG) ; to allow dragging of the lens by click on lens and drag. ; Global $CaptureX = $iWinWidth / ($nMagFactor * 2), $CaptureY = $iWinHeight / ($nMagFactor * 2) ; _MagnifierSetScale($hMagnifyCtrl, $nMagFactor) ; GUISetState(@SW_SHOW, $hMagnifyCtrl) _Exit() WinMove($hMagnifyGUI, "", $aViewFinder[0] - $iWinWidth / 2, $aViewFinder[1] - $iWinHeight / 2) ; lens follows the mouse $aViewFinder[0] = $aViewFinder[0] - $aCaptureSource[0] $aViewFinder[1] = $aViewFinder[1] - $aCaptureSource[1] $aViewFinder = _WinAPI_GetClientScreenPos($hMagnifyGUI) $aViewFinder[0] = $aViewFinder[0] + $aCaptureSource[0] / 2 $aViewFinder[1] = $aViewFinder[1] + $aCaptureSource[1] / 2 _MagnifierSetSource($hMagnifyCtrl, $aViewFinder[0], $aViewFinder[1], $aCaptureSource[0], $aCaptureSource[1]) EndFunc ;==>SnapShot ; #FUNCTION# ==================================================================================================================== ; http://www.autoitscript.com/forum/topic/107966-window-space-position-size/?p=761415 ; Name...........: _WinAPI_GetClientScreenPos (a bit modified by me) ; Description ...: Returns the onscreen x y of a client area of a window. ; Syntax.........: _WinAPI_GetClientScreenPos($hWindow) ; Parameters ....: $hWindow - Identifies an open handle to a window ; Return values .: Success - Array ; [0] x ; [1] y ; Failure - False ; Author ........: Nemcija ; Remarks .......: For minimized windows values wouldn't be correct! ; Related .......: _WinAPI_GetClientRect ; =============================================================================================================================== Return $aiReturnValue EndFunc ;==>_WinAPI_GetClientScreenPos _MagnifierUnInit() EndFunc ;==>_Exit
Hi
I am new at all this so my question is at such a level. I have read the help section but again as a new person it is somewhat foreign to me.
Is a wrapper just a way of including additional files with my script at compiling time and those additional files will be active in my compiled script?
So if I have :#AutoIt3Wrapper_Res_File_Add="full path of the file you want to add" as my guide and in my compiling actually had #AutoIt3Wrapper_Res_File_Add="C:\My Files\Cash Drawer.csv" ,would that file be used when running the script? Is it embedded into the program itself or is it suppose to show up in the directory/file when the program is installed as a standalone?
Thank you in advance for any help or direction.
Hobbyist
My Script:
#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.10.0 Author: GoravG #ce ---------------------------------------------------------------------------- #NoTrayIcon #include <string.au3> $Hex = "FFD8FFE000104A46494600010101006000600000FFDB0043000302020302020303030304030304050805050404050A070706080C0A0C0C0B0A0B0B0D0E12100D0E110E0B0B1016101113141515150C0F171816141812141514FFDB00430103040405040509050509140D0B0D1414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414FFC000110800C8012C03012200021101031101FFC4001F0000010501010101010100000000000000000102030405060708090A0BFFC400B5100002010303020403050504040000017D01020300041105122131410613516107227114328191A1082342B1C11552D1F02433627282090A161718191A25262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F0100030101010101010101010000000000000102030405060708090A0BFFC400B51100020102040403040705040400010277000102031104052131061241510761711322328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A737475767778797A82838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9FAFFDA000C03010002110311003F00FD53A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A2800A28A28010E6A9EA6D749A7DC9B2F2CDE08D8C3E682537E0EDDC01048CE33822AD8A08C8233512574D260B467C59FB017EDB5E2FF00DA6BC51E3DF0B7C41D2346D13C47E1D31BC56DA3DBCD0829BDE3983896590EE57083823EF77EDF6913B549EC2BF2AB4CB7FF008660FF0082BC4D07EF2DF43F1DB3942D9F9FEDA9BF039E47DB23239E807B0AFD00FDA9BE240F84DFB3B7C41F15ACC20B8B0D1E736D231C0170EBE5C23A8EB23A0E0E79E39A273FDCC6AA5D3F12947F7CE9F9E9E8F63E41F80DFF000538D7FE2BFED8B27C33BED33C3D1F816FB50BEB1D2753B38E65BB7F2C3B40EEED31460E23C615072EB8E9CFE8A039AFE7FAFBE0EEA3F013E07FC07F8FF6314E354BFD72E6E6E048EC14186757B31EDBD61998E3A8239EC3F7B3C37E21B3F15F86F4DD6F4E9966D3F50B58EEEDE553C3C6EA1948FA820D6CD28D25DD68CCDBBD4D3696ABEFB1F227C7BFDB3BC6DE0CFDB33C03F04FC0BA4E83AAC1AB7D95B589F518A692E2DC492334823292AAAEDB74F332CADF78718183F67F50335F979FB12DA7FC344FFC143FE2EFC5E980D4349D09E6B7D36EF3950CE7ECD6E578C11F66865FFBE857DEFF00B427ED03E12FD9A7E1BDE78C7C5F752259C4C21B6B4B750D3DE4EC09486252402C4027248000249005677E5A3094B77AFDFB22A49CAACA31E9A7CD6ECF4DEB9A33C7A57E75F87FF6BAFDB3BE31E99FF096FC38F805E1CB7F05DE057B05D7AE8FDA5D36292E1A4BBB632A3124ABAC214838058824FAD7EC75FB7B43FB41F88EFF00E1F78DFC313FC3EF8A9A5C5BAE348B9DEB1DDEC55F35A34900789C3162607DCC13043BE1F6D28B7A75EC4B692BF43CABFE0B59FF00240BC13C7FCCCABFFA4B3D7DC5F0879F855E0EFF00B03DA7FE894AF87BFE0B59FF00240FC13FF632AFFE92CF5F6D7C2CB98AC7E117852E2E2548218B45B592492460AA8A20524927800019CD4C1A54E6DF75F90EA6B3A6BC9FE676B49DCD7E7BEB5FF0513F89DF1BFC7FAAF857F660F8596DE35834690FDAFC41AFCBB2D664CB282ABE6C2B1062A4A179773A83FBB041C747F0B3F6C6F8F7E1AF8BFE1CF01FC7AF82F1787A3F135DC767A7F883C3C5DACE095D242B1BB09678E4626324813232282C558629C5376D37D824F96EDF4DFC8FB96815E07FB5BFED87E11FD91BC176FA9EB90CBABEBBA8F989A56856AE125BA750092CE4111C6A59433E188DC30AC78AF9AEDBF69DFDB9FC5BA34BE29F0E7C00F0CDA7866E44973656DAABB7DBD2004ED0F1B5F4523BE070442BBF82AB861537BDDAD90DADBCCFD10068E82BE4EFD8F7F6F9D27F698D6F55F066BFE1DB9F01FC48D2031BAD12F1CB2CFB0ED94C6595595D187CD13A8650460BE1CAAFFC1437F6B2F167EC95F0FF00C31AE784B4DD1B52BDD535436732EB50CB2C4B18899CED11C919DD9039248C67839C8A97BB6BF5B0A3EF3696E8FAC09F5A0F15F03DDFEDD7F1A7E3BDDDE37ECCDF086DFC59E1ED2A558AEFC4DE2797ECF6D7521504A411C935B9F94F27E766C329644C8CE3FC1BFF0082B56970E91E2AD37E39F86A5F0478D3C390BC925A69B6F27FA7C825DBF668EDE56DF14C3720DAEE54E1D8B2004036BA7B874B9FA21477AFCDFF001B7EDB9FB5CE8DE14B8F89907C00D2345F85F1AA5D18F557927D4E1B6042BBC8AB711C8A090CC1CDB0555218EE51B8FD81FB2BFED27A17ED51F096C7C6BA2DB49A64AD2BDA6A1A5CD2798F657480168F78003AE19195801957190A72A1A8B69BEDBF909B4ACBB9EBE3BF14B9E6BE66FDAF7F6E0D03F65A7D1F41B4D12E7C6FF1075B64FECEF0CD8486377467D81DDC239505B2AAAAACCEC30001961E03A97ED51FB71F833C3D1F8BFC4BF00BC332F852DC45777B069DBCDFFD98905808D6F6596360A4E4B42DE5F25D70A45669A7AF4EE5B4D69D4FD1726941E2BC4FF653FDAA3C2FFB597C374F13787E3934ED42D996DF55D1AE1C3CD61395CEDDC00DE8DC949001B80390AC1957DAC55C938BB344269AB8EA28A282828A28A0028A28A0028A28A0028A28A0028A28A0028A28A00FCD1FF82C3F82EEFC3CDF0B7E2FE8DBE2D4F42D44D8C932E70A7709EDD890411878E4E7BEF1C8C0CE8FFC150BE3445E38FD963E19E91E1F9166B8F88D7B697705B46D932DBAC6B26D19C7FCB59201938FE78FA7FF006E8F8583E307ECADF10742489E6BE8B4F6D46C96319733DB91322AFF00BDB0A7FC0ABF2C3F63AF10EAFF00B4E7ED0FFB3DF83F5389A5D2BE1D5A4F2962C5C32C534B728E41C8033F658BB7DC038E2A29454DFB196CA49FCB77F8A2AA3E44AB2ECD7ABE9F99FA0DFB63FECF16B27FC13EB51F0569F0A997C1BA35ADE59B29DA3366AA656F72D12CDD7A96CE735C07ECEBFB4D1D3FFE096FAA78A5EEBFE26FE0FD2AEB425776FBB70B88ED071CE02CD6C3B74EBDEBEF8D534DB6D634CBAD3EF214B8B4B989A19A17195746043291E84123F1AFE7C7C43A9F8AFE1BA7C45FD99AC217BA1AA78CEDA18F82AD23C124B12803B8949B6619C8C2023AD277A92A94BF9ECFE77B3FC0209421095FE0FCADFE68FD3EFF0082497C2A6F01FECBA9E21BAB6F2B51F166A12EA2646FBED6E87CA841F6F95DC7FD7427BD782FFC15E7C537D2FC73F831E1D7D22E7C47A55B837FFD836E581D4A592E110C0BB4312CC230830A48F30E01CE2BF4B7E16F816CFE19FC39F0CF84EC10259E8BA741611E3B88D02EE3EA4E324F724D7C67FF00054BFD9EFC51E37D0FC1DF153C09A7CDAA7897C1172659ECADA3692592DCBA48B22A2F2DE5BA025473B5D8FF000D6B5A495684EFEEC5AFB92B2FD0CE8A6E12EED3FBDEBFF00A717FC1457E35DBC691C7FB17F8F52341B5555AF40031C003FB378FA578868BA8FC5EF8E3FF000507F86DF151FE02F8CBE1A5BC52C165A9497F6374F0796AB224B34970F6F0AA830BECC1FEE8009C815F4BFC2BFF0082B57C0AF167832CAFBC5FAEDD7823C43B552EF4AB9D32EAE9449B54B3452411C8AD196242962ADC1CA8E33D87C1EFF82827847F683F8DB6FE03F86FE19D7FC45A3449349A9F8B65B736D6568AB1EE84AAB02E448C1D3F7A22208180F9E292B544ED76B525FF000DAD93D0F19FF82D67FC900F040FFA9947FE92CF5EBFFB4FF896E7C29FF04E8F10DF5A090CD2784ED2CBF77F7824EB0C0E7E8164627D81AF20FF0082D69FF8B05E09FF00B1957FF4967AFA7BC51F0AD7E377EC827C0E674B5975AF0BC16F0CF28CA4537908D1391C9C0754271CE0715CED3746A25DFF004374D46B516FB3FCCF23FF00824CF856C340FD8EF43D46D5145D6B5A85EDEDDB8392D22CED02E7D3090A71EF9EF5F6657E53FEC35FB65E95FB1EE99AE7C0FF008EF69A8782AEB42BD966B3BE92CE5B848C4877B42E912B39058F991C88195D642720052DF47691FF000517D1FE317C72F087C3EF827A05EF8E6C6E6E965F10788A6B39ADED6C2C70373A2B857DC09C16902A821554485C6DEAA8FDA49386B7B7E5FA1CF14E9A973696B9F3FF00C78B78BE2CFF00C15E3C09E17D7552E347D1A2B6F2AD6E57313F976B25E818230DBA4201EA0E003D315FA94070076AFCCEFF00828CFC36F177C12FDA17C15FB4EF83F4B9355B0D29A08B5B821DDFBA68F2A1A5201DB14B0B7925F1852A33CB807DAF48FF0082B17ECED7FE118F56BBF13EA3A66A66DDA56D06E347BA7BA5719C45BE38DA12CD8183E66DF9864AF38C20D7B14BAA6EFF0079B5457ABCCB6697E07CE7FB5369CBF0DFFE0AC5F09B5AD042DADE6BCDA6497BE46033996596CE5DC38FBD0A807DBDEBB6FF0082D87FC91AF87F9E9FDBAFFF00A4EF5CD7ECE3E1DF11FEDCFF00B6B37ED09A968179A07C36F0E809A17DBE2C35E1883C70AAB676B32C86495CA965460132739AE97FE0B63C7C1AF87FE9FDBAFF00FA4EF4A49C68C232DEF7F937A1506A55E525B72DBE693B9F6F7C05D034EF0BFC15F04697A4D8C3A769F6FA3DA88EDEDD02A2E62566381D49624927924924924D7E6F7C4BF0968DABFF00C165B44B3BDD36DAEED2E24B6BC9A09A30C8F32699BD1CA9E321A346FAAE6BF4CFE10FFC92AF077FD81ECFFF0044257E71F8EFFE534BE1B1FF004CA2FF00D353D6CF5C5C5F9B39E9FF00BACBFC3FE47E9578EACADF52F056B969750A5C5ADC58CF14B138CABA346C0A91DC1048FC6BF3BFFE089377337C3FF89F6C642608B50B39123ECACD148188FA845FC857E8C78B87FC52BAAFFD7ACBFF00A01AFCE2FF00822273E0BF8A7FF5FB61FF00A2E6A8A5F155FF000AFCCB9FC14FD5FE478E7887E35F89FC2DFF000539F885E30B0F865AC7C5CD6B4479EC74FD0F4C33096D2348E3804EA12198850A587DD033367209C57D307FE0A35F1B88C7FC31878FF1FEFDF7FF002B6BCE7F69ED1FC45FB10FEDB96FFB4369FE1FB9D77E1E7885445AC9B4524DABC88B14C84E70ACC424A8588566CAE46323E8EB5FF82A9FECD93E8D15EBF8E6E6DAE9E013369B2E877C678D8AE4C44AC263DE0FCA4872B9E8C473514DDE8C13E8ACFD4D27FC46EDBEABD3FE01E0DFF04BCF057C43F0F7C79F8BDAD6BFF0E7C45F0EFC31AFC7F6D82CB5AD3E7B68D24372ED1431B491C7E61449241955E98C81900FE98F7AF03FD957F6AFB6FDAC2C7C49ADE8BE0DD73C3BE15D3E6861D3355D69551B532CADE76D44DC8BE5BA953B647CE4125492A3DEC0E6B595D2516B6464B594A57DD8EA28A2A4B0A28A2800A28A2800A28A2800A28A2800A28A2800A28A28023922595195C065618208C83F85717E0DF825F0EFE1C6AB2EA9E13F00F863C31AA4D11824BCD1746B7B499E3243142F1A2B152554904E32A0E3815DC521A5E685BAB0570D79F03FE1CEA1E301E2CBAF00785EE7C56264B91AECDA35B3DF0950009279E537EE50AB86CE46060F15DCD1475B86FA0B498A5A298CF3CF13FECF3F0B3C6DADDD6B3E22F869E0FD7B58BA2A67D4753D06D2E6E252AA146E91E32CD85000C9E0003B575DE1CF0CE91E0FD1AD746D074BB2D1348B45296F61A75B25BC10A9249091A00AA3249C003927D6B568A4B4D05E6735E37F871E14F89561058F8BBC2FA378AEC6097CE8ADB5BD3E2BC8A3930577AAC8AC0360919033827D6B72CECE1D3ED61B5B6863B7B6850471C3120548D00C055038000C0007615668A3607AEE725E39F851E09F89EB643C65E0FD03C582C8BFD946B9A6437A202F8DFB3CD56DBBB6AE71D768CF4AB9E0EF01F86BE1D69274AF0A787B4AF0CE966469BEC3A3D947690798D805F646A1771C0C9C64E05741451B6C0F510F3835E617BFB2EFC1BD46FA7BCBBF849E05BABCB891A696E66F0DD93C9248C4966663164B139249E493CD7A8507A51E631A8A100500281C60573BE37F871E13F89561058F8BFC2FA378AEC6097CE8ADB5BD3E2BC8A3930577AAC8AC036091903382477AE9050467BD37A896857B3B386C2D61B5B5863B7B6810471C312054440301540E00030001D8573B2FC2DF05CDE368FC67278474293C6118DA9E206D3213A828D863C0B8DBE601B095C6EFBA48E86BA9E94BD6975B874B0C92212A14701948208619047D2B9AF047C2FF0006FC338AF22F08784F43F0A4578CB25CA689A6C366B3B0C852E2255DC464E09CE327D6BA9A285A6A87B91C912CA855C065208208C822BCBE2FD95FE0BDBCE97117C21F01C73A3075953C336419581C82088B20E7BD7A98E28A3677179052D145318514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451400514514005145140051451401FFFD9" FileWrite(@ScriptDir &"\Welcome.jpg",_HexToString($Hex))
Hello!
At the firm where I work, the PDFCreator has been updated to a new version. This wouldn't be a problem other then I have to make an update, to handle the new version GUI (I would be better with COM I start to think, but never tried it before so I'm relucant to start). The problem is, that window info tool only finds the Window, but can't identify the Controls on it, what can I do? (My first idea is to just Send tabs till the focus is on the desired control, but thats just... bad)
Any suggestions?
Thanks! (pic: the PDFCreator window)
Hello
My environment:
-Windows 7 x86
-AutoIT 3.3.12.0
-SciTTe 3.4.4
-Au3Check latest beta (3.3.13.19) because of the "missing keyword" and "byref" bug
I recently enabled some flags on AU3Check to show untidied code in my script:
Running AU3Check (3.3.13.19) params:-d -w 1 -w 2 -w 3 -w 5 -w 6 from:C:\Program Files\AutoIt3 input:C:\BWIN3C\AutoIT\lot-tissimo-client.au3
I have some code which i think is creating a false-positive, see below:
Func _DBputValue($iDB,$hDB,$sQuery,$iLinenumber=0,$iDBTimeout=$g_iDBTimeout) Local $sDBLockfile="" If $sQuery="" Then _Log("DBputValue():" & @ScriptLineNumber, "the passed query is empty",$LOG_ERROR) Return SetError(1,0,0) ElseIf StringInStr($sQuery,"INSERT")=0 And StringInStr($sQuery,"UPDATE")=0 Then _Log("DBputValue():" & @ScriptLineNumber, "the passed query is invalid (doesn't contain INSERT or UPDATE)",$LOG_ERROR) _Log("DBputValue():" & @ScriptLineNumber,"the query was: " & $sQuery,$LOG_ERROR) Return SetError(1,0,0) EndIf Switch $iDB Case $DB1 $sDBLockfile=$g_DBLockfile1 Case $DB2 $sDBLockfile=$g_DBLockfile2 EndSwitch
The error message is:
"C:\AutoIT\test.au3"(1175,23) : warning: $sDBLockfile: declared, but not used in func.
Local $sDBLockfile=""
~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIT\test.au3"(1243,23) : warning: $sDBLockfile: declared, but not used in func.
Local $sDBLockfile=""
~~~~~~~~~~~~~~~~~~~~~^
which makes no sense as the variable is used in the Switc-Case block. Or am i mistaken somewhere?
Cheers
Thomy
Hello!
Can someone please explain to me the difference between these 2 functions?
Just because I used to "call" some of my functions without the Call function, I'm sure that I miss something, but for me it looks like they do the same thing.
Thank you!
netsh mbn show interface > %userprofile%\desktop\rename.txt
Run(@ComSpec & " /k netsh mbn show interface > %userprofile%\desktop\rename.txt") While 1 If FileExists(@DesktopDir & "\" & @ComputerName & ".txt") Then Exit Sleep(200) FileMove(@DesktopDir & "\rename.txt", @DesktopDir & "\" & @ComputerName & ".txt", 1) WEnd
I would like to download the OutlookEX.au3 file and add it the lnclude. so that I can use functions _OL_Open and others associated to this.
Can abybody provide me with the location for the download.
I am trying to make a script to open two Intranet sites in tabs in one IE window and then maximize the window. I'm using the following code.
#include <IE.au3> __IENavigate($oIE, "intranetsite2", 0, 0x800)
When I run the script IE opens and goes to the first page but then nothing else happens.
If I modify the code so the _IECreate points to an internet site it then also opens a second tab with the second site and then maximizes as expected.
I see this behavior no matter what intranet site I put in the _IECreate line.
Is there a way to get this to work with intranet sites?
Thanks
Hi I use resources.au3 http://www.autoitscript.com/forum/topic/51103-resources-udf/but I have problems in including a wav file and playing it.
In my code I have declared
#AutoIt3Wrapper_Res_File_Add=1.wav, sound, TEST_WAV_1
#include "resources.au3"
and where I want to play the wav:
; play WAV from resource (sync/async)
_ResourcePlaySound("TEST_WAV_1")
_ResourcePlaySound("TEST_WAV_1", $SND_ASYNC)
I need some help please on this
If I am using:
$Date = StringFormat("%02u%02u", @MON, @MDAY) & StringRight (@Year, 2)
to get today's date.
What would I use to get yesterday's date (current date minus one)?
Thank you