All Activity

This stream auto-updates   

  1. Past hour
  2. For who wants it: ; Unicode Normalization Forms Global Enum $UNF_NormC = 1, $UNF_NormD, $UNF_NormKC = 5, $UNF_NormKD Func _UNF_Change($sIn, $iForm) If $iForm < $UNF_NormC Or $iForm > $UNF_NormC Or $iForm = 4 Then SetError(1, 0, $sIn) Else Local $aRet = DllCall("Normaliz.dll", "int", "NormalizeString", "int", $iForm, "wstr", $sIn, "int", -1, "ptr", 0, "int", 0) Local $tOut = DllStructCreate("wchar[" & $aRet[0] & "]") $aRet = DllCall("Normaliz.dll", "int", "NormalizeString", "int", $iForm, "wstr", $sIn, "int", -1, "ptr", DllStructGetPtr($tOut, 1), "int", $aRet[0]) Return DllStructGetData($tOut, 1) EndIf EndFunc _Example() Func _Example() Local $sStringToCheck1 = 'Jeżeli' Local $sStringToCheck2 = 'Jeżeli' MsgBox(0, 'Binary', StringToBinary($sStringToCheck1) & @CRLF & StringToBinary($sStringToCheck2)) MsgBox(0, 'Using ==', $sStringToCheck1 == $sStringToCheck2) MsgBox(0, 'Using =', $sStringToCheck1 = $sStringToCheck2) MsgBox(0, 'Using StringCompare', StringCompare($sStringToCheck1, $sStringToCheck2) ? 'Distinct' : 'Same') MsgBox(0, '== after normalization', _UNF_Change($sStringToCheck1, $UNF_NormC) == _UNF_Change($sStringToCheck2, $UNF_NormC)) EndFunc
  3. Do you really need that? _Example() Func _Example() Local $sStringToCheck1 = 'Jeżeli' Local $sStringToCheck2 = 'Jeżeli' MsgBox(0, 'Binary', StringToBinary($sStringToCheck1) & @CRLF & StringToBinary($sStringToCheck2)) MsgBox(0, 'Using ==', $sStringToCheck1 == $sStringToCheck2) MsgBox(0, 'Using =', $sStringToCheck1 = $sStringToCheck2) MsgBox(0, 'Using StringCompare', StringCompare($sStringToCheck1, $sStringToCheck2) ? 'Distinct' : 'Same') EndFunc
  4. TO EMBED FLASH ACCOUNT FIRST YOU HAVE TO CHOOSE FILE THEN YOU HAVE TO OPEN FLASH MOVIES AFTER CHOOSING FILE NAME IT AND AFTER THAT INSERT THE FLASH MOVIE IN HTML PAGE https://notresponding.net/shockwave-flash-fix/
  5. If any of you get to write the DllCall() for the Normaliz.dll please post the code
  6. Thank you for this joke. I'm waiting for support from someone who understands the subject.
  7. Today
  8. Both string use the same encoding but they differ in Unicode normalization form. Unicode Normalization Form: see https://r12a.github.io/scripts/tutorial/part3 and search for "Precomposed vs. decomposed" to see how this works in Latin scripts. Read about Windows support: https://msdn.microsoft.com/en-us/library/windows/desktop/dd374126(v=vs.85).aspx Change normalization form of a string: https://msdn.microsoft.com/en-us/library/windows/desktop/dd319093(v=vs.85).aspx
  9. _Example() Func _Example() Local $sStringToCheck1 = 'Jeżeli' Local $sStringToCheck2 = 'Jeżeli' MsgBox(0, '', BinaryToString(StringToBinary($sStringToCheck1,1),4) & @CRLF & BinaryToString(StringToBinary($sStringToCheck2,1),4)) EndFunc Hope it helps 2nd try: _Example() Func _Example() Local $sStringToCheck1 = 'Jeżeli' Local $sStringToCheck2 = 'Jeżeli' MsgBox(262144, '', BinaryToString(StringToBinary($sStringToCheck1,1),4) & " = " & isItOk($sStringToCheck1) & " = " & $sStringToCheck1 & @CR & _ BinaryToString(StringToBinary($sStringToCheck2,1),4) & " = " & isItOk($sStringToCheck2) & " = " & $sStringToCheck2 ) EndFunc Func isItOk($s) ; maybe ? If StringToBinary(BinaryToString(StringToBinary($s,1),3)) = "" Then Return 0 Return 1 EndFunc
  10. I have the same problem, the tray icon will disappear, but the script is still running
  11. that is ANSI colors. the symbols are ESC codes.
  12. Don't have to show more than the pertinent code section in a form of an example. Is very unlikely that the call to kernel32.dll fails.
  13. Hi, Since sometime I have been seeing a weird issue that all my applications are sometimes giving previous day date instead of current date. After looking at all the sections I finally found if the machine was turned ON prior 12am and the application launches after 12 am which is probably the next day of boot, Date_Time_GetSystemTime ( ) shows the previous day date. Eg. Today is 19/11/2017. No matter how many times I will launch the application during the day will always show me the current date as 19/11/2017. But if I will launch the application after 12am on 20/11/2017 this function for some reason reads the bootup time as 19th and displays the same. Can someone test this once and tell me if it's just me? I will then provide the code.
  14. Ok, thanks for that! I'll give it a try - it might be ok as a workaround.
  15. With this web browsing Netbook of mine, I really can't afford to have even one script running constantly in the background, as I am low on resources before I start. Maximum RAM which I have installed is 2 Gb, and the longer it is running the more degraded the performance, and rebooting to refresh is not really a favored option, when it can take 20 minutes or more to complete. No doubt this age of hungry AV and Browsers etc play a big part.
  16. Hello, I have a script which uses a GUI with two buttons. It gets shown and hidden., and pressing the buttons (including their hotkeys) highlights the button, making you able to press enter the next time. However, I don't want that. I've tried using WinActivate() to make enter do things on another program, but the enter is still tied to the AutoIT GUI (which still has the button highlighted). Here's the important part of my code: $MY_GUI = GUICreate("Check.exe", 400, 300, ((@DesktopWidth / 2) - 200), -500) WinSetOnTop($MY_GUI, "", 1) ;Keeps the window on the top. $Button1 = GUICtrlCreateButton("Pass (Ctrl+P)", 40, 250, 120, 40, $WS_GROUP) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Button2 = GUICtrlCreateButton("Fail (Ctrl+F)", 240, 250, 120, 40, $WS_GROUP) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $GUIText = GUICtrlCreateLabel("", 20, 10, 360, 230) GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif") GUICtrlSetData($GUIText, Execute($stepMessage[$step])) $showGUI = "True" GUISetState(@SW_SHOW) While($showGUI = "True") $buttonPressed = GUIGetMsg() Switch $buttonPressed Case $Button1 ;Pass $pass = "True" $buttonPressed = 0 $showGUI = "False" GUISetState(@SW_HIDE) Case $Button2 ;Fail $buttonPressed = 0 $showGUI = "False" GUISetState(@SW_HIDE) While($message = "") $message = InputBox("Check.exe", "Please enter the reason the step failed." & @CRLF, "", "", 300, 200, ((@DesktopWidth / 2) - 150), -400) WEnd Return $message EndSwitch WEnd Local $pass = "False" ;Whether "Pass" or "Fail" was pressed. Local $failLog = xxxfunc($pass) ;Returns a message to log if the step failed. ##THIS CALLS THE CODE SNIPPET ABOVE## FileWrite($file, _Now() & ": Step " & $step & getStatus($pass) & "and took " & Ceiling(TimerDiff($timer) / 1000) & " seconds." & @CRLF) If($failLog <> "") Then FileWrite($file, "Logged comment: " & $failLog & @CRLF) EndIf WinActivate("[TITLE:ProgramName]") ;Hotkeys: HotKeySet("^{p}", "pressPass") HotKeySet("^{f}", "pressFail") Func pressPass() $buttonPressed = $Button1 EndFunc Func pressFail() $buttonPressed = $Button2 EndFunc The GUI's button/hotkey pressing works correctly. The same WinActivate code works in another script of mine. Together, WinActivate is not take "Active" away from the GUI's last-pressed button. How do I fix this? Thank you in advance.
  17. sometimes,the save is ok,but sometimes it has click the dropdown button and it has not save
  18. This is true. Thanks for the tip
  19. 1) Would a style of coding where everything of the GUI is in an array make sense ? 2) Can creating controls with Execute() bring trouble down the road ? This is the basic idea: Global $g_Gui[10][10] = [[0]] #include <MsgBoxConstants.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Global $eGui = GUICtrlArray('GUICreate',"Form1", 305, 269, 50, 50, BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_TABSTOP), BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE)) Global $eInputForGofigure = GUICtrlArray("GUICtrlCreateInput","Input1", 32, 32, 121, 21,-1, -1, $GUI_DOCKLEFT+$GUI_DOCKTOP+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) Global $eEditForGofigure = GUICtrlArray('GUICtrlCreateEdit',"Edit1"&@CRLF&"=P", 32, 72, 185, 89,-1, -1, $GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM) Global $eBttnShowArray = GUICtrlArray("GUICtrlCreateButton","Show Gui array", 176, 24, 100, 25,-1, -1, $GUI_DOCKLEFT+$GUI_DOCKTOP+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) Global $eLabelForGofigure = GUICtrlArray("GUICtrlCreateLabel","Label1", 40, 180, 180, 17,-1, -1, $GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKBOTTOM+$GUI_DOCKHEIGHT) GUISetState(@SW_SHOW) Func GUICtrlArray($sCtrl, $sText, $iLeft, $iTop , $iWidth = default , $iHeight = default , $iStyle = -1, $iExStyle = -1, $iResize = 0) $g_Gui[0][0] += 1 Local $i = $g_Gui[0][0] $g_Gui[$i][1] = $sCtrl $g_Gui[$i][2] = $sText $g_Gui[$i][3] = $iTop $g_Gui[$i][4] = $iWidth $g_Gui[$i][5] = $iHeight $g_Gui[$i][6] = $iStyle $g_Gui[$i][7] = $iExStyle $g_Gui[$i][8] = $iResize $g_Gui[$i][9] = "anything thing else ?" Switch $sCtrl Case "GUICreate" $g_Gui[$i][0] = Execute($sCtrl & "('" & $sText & "'," & $iLeft & "," & $iTop & "," & $iWidth & "," & $iHeight & "," & $iStyle & "," & $iExStyle & "," & $iResize & ")") Case Else $g_Gui[$i][0] = Execute($sCtrl & "('" & $sText & "'," & $iLeft & "," & $iTop & "," & $iWidth & "," & $iHeight & "," & $iStyle& "," & $iExStyle & ")") If $iResize Then GUICtrlSetResizing($g_Gui[$i][0], $iResize) EndSwitch Return $i EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete() Exit Case $g_Gui[$eBttnShowArray][0] _ArrayDisplay($g_Gui, "$g_Gui") EndSwitch WEnd 3) Do you have an idea to make this "mode of coding" more functional ? 4) Is this a waste of time ( for 1 or more reasons ) ? As always, anything you post will be used against you is welcomed
  20. My cherry mx buttons are fine. I don’t use their custom software I just use the Microsoft built in drivers. Lol
  21. See, thats why I have a modular script running on startup through the autoit compiler. Far less resource intensive than multiple compiled exe's, and crazy easy to modify.
  22. Yesterday
  23. @AdminC the Examples forum very, very clearly states: Please pay attention to where you're posting in the future.
  24. You're not sending data, you're setting it. Rather than "{ENTER}" try @CRLF
  25. @Light0 how about posting your code so we can see what you're trying to accomplish, rather than having us guess
  26. @OP You will see the difference between strings using an editor with 'composite fonts'. The first string contains a combining dot above(Ux0307). The second string has a latin small letter z with dot above(Ux017C). If you go for a solution dealing with a file have a look here: Have fun !
  27. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("shutdown by AU3Builder", 300, 133, 192, 124) $Progress1 = GUICtrlCreateProgress(16, 24, 209, 25) $Label1 = GUICtrlCreateLabel("", 112, 112, 21, 17) $Button1 = GUICtrlCreateButton(" Start Countdown", 64, 64, 105, 33) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Countdown(20,20) EndSwitch WEnd Func Countdown($progressbar,$label) $I = 0 Do Sleep(1000) $I = $I + 1 $label = $label - 1 GUICtrlSetData($Progress1,$I/$progressbar*100) GUICtrlSetData($Label1,$label) Until $i = $progressbar EndFunc Here you are
  28. Hi guys! So I´ve been playing around with AutoIt again after a couple of years of absence. I'm trying to make ImageSearch work in my favor and got a test script going that looks like this: #include <ImageSearch2015.au3> Local $findImage[8], $resultPosition, $tolerance, $transparency, $waitSecs, $x, $y $findImage[0] = 7 $findImage[1] = "C:\Users\Micke\Desktop\AutoIt Script\ImageSearch2015\HK.png" $findImage[2] = "C:\Users\Micke\Desktop\AutoIt Script\ImageSearch2015\K4.png" $findImage[3] = "C:\Users\Micke\Desktop\AutoIt Script\ImageSearch2015\K5.png" $findImage[4] = "C:\Users\Micke\Desktop\AutoIt Script\ImageSearch2015\R8.png" $findImage[5] = "C:\Users\Micke\Desktop\AutoIt Script\ImageSearch2015\S7.png" $findImage[6] = "C:\Users\Micke\Desktop\AutoIt Script\ImageSearch2015\S8.png" $findImage[7] = "C:\Users\Micke\Desktop\AutoIt Script\ImageSearch2015\SJ.png" $x=0 $y=0 $waitSecs = 1 $findImage = _WaitForImagesSearch($findImage, $waitSecs, $resultPosition, $x, $y, $tolerance, $transparency = 0) ConsoleWrite($findImage & @CRLF) It works but kind of slow(2.5 s) and the area I want to search for those .png's is much smaller than my desktop, so my question is how would I go about setting that smaller area up in my script?
  1. Load more activity