Jump to content

AutoBert

Active Members
  • Posts

    1,935
  • Joined

  • Last visited

  • Days Won

    9

AutoBert last won the day on October 7 2016

AutoBert had the most liked content!

About AutoBert

  • Birthday November 13

Recent Profile Visitors

1,508 profile views

AutoBert's Achievements

  1. Thanks to both, i used the link that@ jchd posted, started my already compiled exe and it runs. So i marked this post as solution, yet i can go on with next steps: insert the dates for WSBK and MotoGP. Thank's a lot. Sorry @SOLVE-SMART, but he was faster. But i will show in the forum you posted (as guest without registration) mfg (auto)Bert
  2. This is the question because i get no error. But i lost usability (all calculations done in a Memory db and results all birthsdays are forgotten). 21600 lines are in stripped file as result of 1400 lines source code. Is there a need to update to a newer version? I'm not firm with github so i am afraid of new errors. Happy new year and bestwishes from (auto)Bert
  3. You didn't activate a window, so i think the loop is running and the send get's lost.
  4. I hope i didn,t misunterstood your problem: Where is a small demo source for the second threat? Why is a second thread necesarry as it seems you prefer to do one job (dl a page) and after finished doing the next job? Adlibregister could be very helpfull just look this small demo: #ingclude <GUIConstantsEx.au3> #include <GUIConstants.au3> #include <ListviewConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <GuiListView.au3> ConsoleWrite(Sqrt(1.07*1.07+1.27*1.27)&@crlf) ;TCPStartup() Global $aServers[1][3], $sTitle = "Serverstatus " Global $iPing, $iAct, $iRepeat, $iMaxRepeat = 5 ;If Not FileExists('conf.ini') Then FileWriteLine('conf.ini','autoit.de| #Region Gui $hGuiMain = GUICreate($sTitle, 248, 318, 192, 142) $idMnu_file = GUICtrlCreateMenu("File") $idMnu_file_test = GUICtrlCreateMenuItem("test", $idMnu_file) $idMnu_file_close = GUICtrlCreateMenuItem("Close", $idMnu_file) $idMnu_edit = GUICtrlCreateMenu("Edit") $idMnu_edit_conf = GUICtrlCreateMenuItem("Preferences", $idMnu_edit) $idMnu_help = GUICtrlCreateMenu("?") $idLV_Server = GUICtrlCreateListView("Name|Adresse|Port|Ping", 5, 5, 238, 288, $LVS_SORTASCENDING) _GUICtrlListView_SetColumnWidth($idLV_Server, 0, 80) _GUICtrlListView_SetColumnWidth($idLV_Server, 1, 100) _GUICtrlListView_SetColumnWidth($idLV_Server, 2, 0) ;unsichtbar _GUICtrlListView_SetColumnWidth($idLV_Server, 3, $LVSCW_AUTOSIZE_USEHEADER) GUISetState(@SW_SHOW, $hGuiMain) $hGuiConf = GUICreate("Preferences", 500, 425) $idTab_conf = GUICtrlCreateTab(10, 10, 480, 405) $idTab_conf_servers = GUICtrlCreateTabItem("Servers") GUICtrlCreateGroup("Server Hinzufügen", 30, 35, 135, 185) $idLbl_name = GUICtrlCreateLabel("Name:", 40, 60) $idInp_name = GUICtrlCreateInput("", 50, 75, 100, 20) $idLbl_adresse = GUICtrlCreateLabel("Adresse:", 40, 105) $idInp_adresse = GUICtrlCreateInput("", 50, 120, 100, 20) GUICtrlCreateLabel("Port:", 40, 145) $idInp_port = GUICtrlCreateInput("", 50, 160, 100, 20) $idBtn_addserver = GUICtrlCreateButton("Add", 70, 185, 50) $idLstServer = GUICtrlCreateList("", 180, 40, 150, 190) $idBtn_delete = GUICtrlCreateButton("Löschen", 205, 240) GUICtrlCreateTabItem("") #EndRegion Gui _getServers() _GUICtrlListView_RegisterSortCallBack($idLV_Server) While 1 $msg = GUIGetMsg(1) Switch $msg[1] Case $hGuiMain Switch $msg[0] Case $GUI_EVENT_CLOSE, $idMnu_file_close _GUICtrlListView_UnRegisterSortCallBack($idLV_Server) Exit Case $idMnu_edit_conf GUISetState(@SW_SHOW, $hGuiConf) Case $idMnu_file_test $iAct = -1 _PingIt() Case $idLV_Server _GUICtrlListView_SortItems($idLV_Server, GUICtrlGetState($idLV_Server)) $iAct = -1 $iRepeat = 0 EndSwitch Case $hGuiConf Switch $msg[0] Case $GUI_EVENT_CLOSE GUISetState(@SW_HIDE, $hGuiConf) _getServers() $iAct = -1 Case $idBtn_addserver $name = GUICtrlRead($idInp_name) $adresse = GUICtrlRead($idInp_adresse) $port = GUICtrlRead($idInp_port) $read2 = IniReadSectionNames("conf.ini") $count = UBound($read2) - 1 IniWrite("conf.ini", $name, "adresse", $adresse) IniWrite("conf.ini", $name, "port", $port) GUICtrlSetData($idInp_name, "") GUICtrlSetData($idInp_adresse, "") GUICtrlSetData($idInp_port, "") Case $idBtn_delete $read3 = GUICtrlRead($idLstServer) IniDelete("conf.ini", $read3) EndSwitch EndSwitch WEnd Func _getServers() Local $aTmp = IniReadSectionNames("conf.ini") _ArraySort($aTmp, 0, 1) Local $aData _GUICtrlListView_DeleteAllItems($idLV_Server) ReDim $aServers[$aTmp[0] + 1][2] For $i = 1 To $aTmp[0] $aData = IniReadSection("conf.ini", $aTmp[$i]) $aServers[$i][0] = GUICtrlCreateListViewItem($aTmp[$i] & '|' & $aData[1][1] & '|' & $aData[2][1], $idLV_Server) $aServers[$i][1] = $aTmp[$i] ; $aServers[$i][2]=$aData[1] ; $aServers[$i][3]=$aData[2] Next ; _ArrayDisplay($aServers) EndFunc ;==>_getServers Func _PingIt() AdlibUnRegister('_PingIt') ;first disable $iAct += 1 WinSetTitle($hGuiMain, '', $sTitle & $iRepeat+1) Local $aItem = _GUICtrlListView_GetItemTextArray($idLV_Server, $iAct) Local $iItem = _ArraySearch($aServers, $aItem[1]) ;Server aus Listview im Array suchen ConsoleWrite($iAct & @TAB & $aItem[1] & @TAB) $iPing = Ping($aItem[2]) If @error Then $iPing = 99999 ;für nicht erreichbar nötig wegen Sortiermöglichkeit ConsoleWrite($iPing & @CRLF) GUICtrlSetData($aServers[$iItem][0], '|||' & StringFormat('%5s', $iPing)) Switch $iPing ;Farben je nach Ping Case 0 To 24 GUICtrlSetBkColor($aServers[$iItem][0], 0x22C21F) GUICtrlSetColor($aServers[$iItem][0], 0x0) Case 25 To 549 GUICtrlSetBkColor($aServers[$iItem][0], 0x00FF1F) GUICtrlSetColor($aServers[$iItem][0], 0x0) Case 550 To 999 GUICtrlSetBkColor($aServers[$iItem][0], 0x772200) GUICtrlSetColor($aServers[$iItem][0], 0xFFFFFF) Case Else GUICtrlSetBkColor($aServers[$iItem][0], 0xFF0000) GUICtrlSetColor($aServers[$iItem][0], 0xFFFFFF) EndSwitch If $iAct < _GUICtrlListView_GetItemCount($idLV_Server) - 1 Then AdlibRegister('_PingIt') ;don't forget to renable Else If $iRepeat < $iMaxRepeat - 1 Then $iAct = -1 $iRepeat += 1 #cs For $iItem = 0 To _GUICtrlListView_GetItemCount($idLV_Server) GUICtrlSetColor($aServers[$iItem][0], 0x000000) GUICtrlSetBkColor($aServers[$iItem][0], 0xFFFFFF) Next #ce AdlibRegister('_PingIt') ;don't forget to reenable EndIf EndIf EndFunc ;==>_PingIt happy new year and best wishes (auto)Bert
  5. 1. Your script isn't runable: seems that you missed one include that isn't part of the standard autoit. 2. as @argumentum already posted:
  6. have a look in helfile -> directory macros: @Tempdir should help you.
  7. I added this 2 lines: Global $aPos = WinGetPos($hGUI) ConsoleWrite('GUI->Size: ' & $aPos[2] & '|' & $aPos[3] & @CRLF) and get consoleoutput: GUI->Size: 136|39 Added 9 items to the list Screen Dimensions: 1366 x 768 Listview Dimensions: 1028 x 19 Calculated GUI size: 150 x 84.375 OS: WIN_10 and i'm wondering why is the real size (136|90) different to calculated size(150x84.375) Sorry tested at wrong point, testing after GuiSetState the console output is Added 9 items to the list Screen Dimensions: 1366 x 768 Listview Dimensions: 1028 x 19 Calculated GUI size: 150 x 84.375 OS: WIN_10 GUI->Size: 150|84
  8. Also the caches have a effect, i think if you test the non interrupted script first and the interrupted (version with 100 interruptions) the differcence is smaller, maybe the interupted is a little bit faster.
  9. That's the GuiGetMsg, a bigger block in the FileRead helps for getting better performance, using: $dTempData = FileRead($hFile, Ceiling($iFileSizeForProgress / 100)) will effect better performance for files gt 51200 kb, but smaller files will be slower than actual.
  10. Inserting a block like this in the 2. Do .. Until (func _Crypt_HashFile2) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ;ESC => break hashing $vReturn = -1 ExitLoop 2 Case Else ;hash the data EndSwitch is a possible solution wich breaks if user use the X-Button or press ESCape.
  11. Easier, as finding a solution for level 8.
  12. After adding #AutoIt3Wrapper_UseX64=n it works.
  13. Read about: in helpfile and test in both modes.
  14. I don't know if it works with TIF's but sure it works with PNG's. Edit: Just tested with the welcomefax.tif (the onliest tif i have) and it works: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUICtrlPic.au3> #include <Array.au3> Global $hGui = GUICreate("Show Tif",@DesktopWidth, @DesktopHeight) Global $aDim = WinGetClientSize($hGui) Global $sAutoItPath If @Compiled Then $sAutoItPath=RegRead64('HKLM\Software\AutoIt v3\AutoIt', 'InstallDir')&'\' Else $sAutoItPath= StringReplace(@AutoItExe, "autoit3.exe", "")&'\' $sAutoItPath= StringReplace(@AutoItExe, "autoit3_x64.exe", "") EndIf Global $Background = _GUICtrlPic_Create("C:\Users\(len)Bert\Downloads\Documents\Fax\Inbox\WelcomeFax.tif", 0, 0, $aDim[0], $aDim[1], $SS_CENTERIMAGE, Default) GUICtrlSetState(-1, $Gui_DISABLE) GUISetState() While 1 Switch GUIGetMsg() Case $Gui_EVENT_CLOSE Exit EndSwitch WEnd Func RegRead64($sKeyname, $sValue) ;Aus AutoUpdateIt.au3 Local $sRes = RegRead($sKeyname, $sValue) If @error And @AutoItX64 Then $sKeyname = StringReplace($sKeyname, "HKEY_LOCAL_MACHINE", "HKLM") $sKeyname = StringReplace($sKeyname, "HKLM\SOFTWARE\", "HKLM\SOFTWARE\Wow6432Node\") $sRes = RegRead($sKeyname, $sValue) If @error Then SetError(1) Return "" EndIf EndIf SetError(0) Return $sRes EndFunc ;==>RegRead64 GUICtrlPic.au3
×
×
  • Create New...