Search the Community
Showing results for tags 'win7'.
-
Hi, I have a very strange problem concerning MouseClick function. I need to start Control Panel, navigate it on the Display Section (Adjust screen resolution link), click on it, and from the next Dialog choose Intel Graphic tool tab and navigate into it when it opens. I wasn't using MouseClick() at first when I tried to use Control IDs, but I was fed up with the Autoit Window Info poor and inaccurate info (It flickers and the moment I click on the control the control ID and class disappear) so I ended up choosing the easiest way. The code I'm posting worked OK until two weeks ago, the mouse clicks were accurately performed and the Script reached the end with no errors...and I was happy. All of a sudden, between one try and the other, I noticed the cursor not flying exactly where it was supposed to, namely to the Control Panel ->Display->Adjust screen resolution link but it clicked some 30 pixels below and some 30 pixels to the left, choosing obviously and undesired function and from that point it screwed the whole thing up. And from that moment onward, it seems I can no longer regain the mouse to click on that sequence. Could it be because my Control Panel ->Display form moved slightly from one test to another and therefore I got that small offside? If you believe this is the reason, I should then re position the Control Panel ->Display window to 0,0 and recalculate all the clicks. do you have a suggestion? Thanks a lot Dave RotateDisplays.au3
-
I need to open an INTEL Graphic Tool clicking on a Win7 Tray Icon. This icon is not shown on the Win7 Tray but it is shown once you click on a button that shows a little arrow-up. This button opens up an extension of the tray and there is my INTEL Graphic Tool Icon. The first ControlClick('[Class:Shell_TrayWnd]', '', 1502 ) at line 26 of my source code (Rotatedisplays.au3) works fine as it clicks on the up-arrow shown on the uparrowfirst Menu.jpg picture and opens up an extension of the tray. Then I'm trying to click on the INTEL Graphic Tool Icon which is the first blue icon (up-left) of the tray extension but I failed all my attempts. Can somebody help me out? Thanks Dave RotateDisplays.au3
-
I saw a post dated 2013 about WinSetTitle not working in Win7 64bit. No answer there for me. I am trying to set the title of a window, the function returns success and the title is changed for about 50 ms and then reverts back to its original value. #RequireAdmin makes no difference in operation. I have tried using the handle, the title and the class to define the window. Operation is the same for all three ways. EG: WinSetTitle("Old Title", "", "New Title") WinSetTitle("[Class:Class name]","","New Title") WinSetTitle(handle,"","New Title") ;======================================================================================= All functions report success. WinActivate("PxxCXpbHG", "Text") WinSetTitle("PxxCXpbHG ", "Text","New title") $M1=WinGetTitle("[ACTIVE]","") sleep (100) $M2=WinGetTitle("[ACTIVE]","") MsgBox(0,"", $M1 & " " & $M2) ;------------------> "New Title" "PxxCXpbHG" If I change Sleep to 50 , then it is "New Title", "New Title" so somewhere between 50 and 100 ms it gets changed back,but by what?? Thanks for any help in this matter.
-
A few months ago I tried compiling scripts on Windows 7 x64 using NomadMemory. Everywhere I looked no one could figure out why _memoryRead() would only return 0s. The best advice that would be given is set debug privileges. At the time I just continued compiling my scripts on Vista x64 and accepted there wasn't a solution. However, a few months back I shared my code to a few people whom were using Windows 7 x64 and had to figure out why the scripts were not working. Here is what I found. Anything typecast as variable1 would immediately convert to 64 bit representation, however, if typecast instead as variable2 would not. variable1 = "0xVALUE" ;Bad, auto-converts to x64 representation variable2 = hex("VALUE") ;Good, stays as needed for x32 So i converted every instance of Variable = "0xVALUE" accordingly. The scripts still were not reading memory, but I was able to isolate the new problem, NomadMemory would return 64 bit representation for every int value. Floats, Bytes, character arrays, etc were working fine (inherently are the same length), but int, uint, etc were not. The workaround for this was replacing every _MemoryRead() with a function Func _NewMemRead($Addr1, $Proc1, $type1) If $type1 = "int" Then ;I only used int, if you use uint or any other integer representation, add them in here Return (Dec(Hex(StringRegExpReplace(_MemoryRead($Addr1, $Proc1, $type1), "00000000", "", 1)))) Else Return _MemoryRead($Addr1, $Proc1, $type1) EndIf EndFunc ;==>_NewMemRead Essentially the function would strip the extra 0s because of the conversion to x64, allowing the script to read memory. I am writing this up many months after the fact, At this time I cannot remember why I had to type cast the result to Hex and then Dec to get it to return the proper integer value. But it is probably the first problem mentioned above about the value being typecast to the wrong format. I hope this helps anyone out there who is looking for a solution to this problem.
- 4 replies
-
- nomadmemory
- windows 7
-
(and 2 more)
Tagged with:
-
Hello all! I was in read-only until today, started to use Autoit 3 weeks ago. It can really make things easy, I really love it I have some script now that works and make our job effective, but I have problems with the latest. It works if I open the script's folder and run the exe directly. If I use the shortcut that I created on the desktop, it's not working properly. Activates the window, but not opening/exporting my files, just opens the last msgbox. I use ftp becouse the PC and the destination PC is not on the same network. Here's the script: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\microsoft_excel.ico #AutoIt3Wrapper_Res_Comment=send file over ftp #AutoIt3Wrapper_Res_Description=send file over ftp for process #AutoIt3Wrapper_Res_Language=1038 #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.2 Author: imitto Script Function: Rename and put playlist file on ftp #ce ---------------------------------------------------------------------------- #RequireAdmin #include <File.au3> #include <FileConstants.au3> #include <AutoItConstants.au3> #include <MsgBoxConstants.au3> #include <FTPEx.au3> ; Script Start Global $playlistname=@YEAR&@MON&@MDAY&"-playlist.pll" BlockInput($BI_DISABLE) Opt ("WinTitleMatchMode", 2) WinActivate("MAIN SCHED") WinWaitActive("MAIN SCHED") ;Opt ("WinTitleMatchMode", 1) Send("!fo") WinWaitActive("Open") Send("Z:\playlist\"&$playlistname&"{ENTER}") Sleep(2000) Send("!fe") WinWaitActive("MCon") Send("{ENTER}") WinWaitActive("Save") Send("C:\sendFileForXLS\lista.txt{ENTER}") Sleep(500) Send("!fc") BlockInput($BI_ENABLE) Sleep(50) Opt ("WinTitleMatchMode", 1) Local $hOpen = _FTP_Open('MyFTP Control') $ftp=_FTP_Connect($hOpen, "**********", "******", "******") If @error Then MsgBox($MB_SYSTEMMODAL, '_FTP_Connect', 'ERROR=' & @error) Else _FTP_FilePut($ftp, @ScriptDir&"\lista.txt", "/lista.txt") EndIf Local $iFtpc = _FTP_Close($hOpen) FileDelete(@ScriptDir&"\lista.txt") MsgBox(0, "", "Playlist exported", 2) Exit
-
no web server atm. so the win7 file properties images I can't show you but they are totally different from the variables I am getting..But then I am just guesstamating the code needed from any and all sources i can find to just get the Minutes difference between 2 files. I can touch the files to change anything, but can't get the value to use it and using FilesetTime/ only works with the Help code. and it is way over my head. I have searched the web looking for a step by step but it's all in arrays that array me. The FileSetTime ;Modified help file #include <FileConstants.au3> #include <MsgBoxConstants.au3> $sFilePath=("C:\file1.txt") Local $iFileSetTime = FileSetTime($sFilePath, "20031101121101" ) ; Display the modified timestamp of the file and return as a string in the format YYYYMMDDHHMMSS. If $iFileSetTime Then ; MsgBox($MB_SYSTEMMODAL, "", "Timestamp:" & @CRLF & FileGetTime($sFilePath, $FT_ACCESSED, 2 )) RETURNS Timestamp: ; MsgBox($MB_SYSTEMMODAL, "", "Timestamp:" & @CRLF & FileGetTime($sFilePath, 2 )) RETURNS Timestamp: ; MsgBox($MB_SYSTEMMODAL, "", "Timestamp:" & @CRLF & FileGetTime($sFilePath, "YYYYMMDDHHMMSS" )) RETURNS Timestamp: ; MsgBox($MB_SYSTEMMODAL, "", "Timestamp:" & @CRLF & FileGetTime($sFilePath, $FT_MODIFIED, 1)) RETURNS Timestamp: The only one that returns Anything is the last one and it returns the whole string..Timestamp:20031101121101 ; RETURNS Timestamp:20031101121101 File Properties accessed time and date ?Saturday, ?November ?01, ?2003, ??1:01:00 AM File EndIf changed created date but displays YYYYMMDDHHMMSS" So I got creative and after /////..... and more of that got this to work.. "Kinda" #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=TimeCK.exe #AutoIt3Wrapper_Res_Fileversion=21 #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator #AutoIt3Wrapper_Add_Constants=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include<File.au3> #include <FileConstants.au3> #include <Constants.au3> #include <MsgBoxConstants.au3> #Include <Date.au3> ;change file.au3's "modified" timestamp to 1st Nov 2003 and current time ;Local $var = FileSetTime("file.au3", "20031101") ;Local $iFileSetTime = FileSetTime($sFilePath, "20031101", $FT_MODIFIED) ;Local $iFileSetTime = FileSetTime("c:\2a.jpg", "20031101", 1) ;change file.au3's "modified" timestamp to 1st Nov 2003 and current time ;Local $v = FileSetTime(@ScriptDir &"\00\2a.jpg", "20031101", 1) Local $v = FileSetTime(@ScriptDir &"\00\2a.jpg", "2003110120031101121101", 1) If Not @error Then ; Local $HHMMSS = $v[0] & "/" & $v[1] & "/" & $v[2] Local $MMss = ($v ) MsgBox(0, "Creation date of 2a", $MMss) EndIf Local $t = FileGetTime(@ScriptDir & "\00\Files\core\2a.jpg", 1) ;HH:MM:SS If Not @error Then ; Local $hhmms = $t[0] & "/" & $t[1] & "/" & $t[2] Local $mm = $t[1] MsgBox(0, "time change", $mm) ;Local $t = FileGetTime("c:\2a.jpg", 1) ;HH:MM:SS ;If Not @error Then ; Local $hhmms = $t[0] & "/" & $t[1] & "/" & $t[2] ; Local $mm = $t[2] ; MsgBox(0, "Creation date of notepad.exe", $mm) EndIf The issue is it gives 3 totally different times for the Minute.. I only want the minute difference. the "Creation date of 2a" tag gives a 0 minute value==and in 3 hours now it still gives the 0 minute value the "time change" tag gives a 28 minute value ==== and in 3 hours now it still gives the 28 minute value Win7 "File Properties" tag gives ?Sunday, ?June ?22, ?2014, ??1:11:42 PM ------------FileSetTime(@ScriptDir &"002a.jpg", "2003110120031101121101", 1) Saturday, ?June ?28, ?2014, ??3:05:36 PM Sunday, ?June ?22, ?2014, ??1:11:42 PM Saturday, ?November ?01, ?2003, ??7:03:11 PM --------------------FileGetTime(@ScriptDir & "00Filescore2a.jpg", 1) Saturday, ?June ?28, ?2014, ??3:05:36 PM ?Today, ?June ?30, ?2014, ??5 minutes ago U know I think I learned more in the two hours it took to write this very bad dissertation of the issue. Researching everything I wanted to say and try to explain the steps took to get the results.
- 5 replies
-
- filesettime
- filegettime
-
(and 2 more)
Tagged with:
-
Simple script that took me about 15 minutes. I built it for a friend but thought someone else could use it.. Just make sure you compile it as 64bit if you have a 64bit system which most of you using windows 7 do. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=HWandHank.ico #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.10.2 Author: Mike Kovacic Script Function: Set windows 7 to auto login using provided credentials. * This must be compiled as x64 to work. #ce ---------------------------------------------------------------------------- #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $MuhApp = GUICreate("Set Autologon", 309, 127, 212, 132) $Username = GUICtrlCreateInput("", 8, 16, 153, 21) $Password = GUICtrlCreateInput("", 8, 48, 153, 21) $Domain = GUICtrlCreateInput(@ComputerName, 8, 80, 153, 21) $Set = GUICtrlCreateButton("Set Autologon", 176, 24, 123, 25) $REmove = GUICtrlCreateButton("Remove Autologin", 176, 56, 123, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $set setautoadminlogin() Case $remove removeautologin() EndSwitch WEnd Func setautoadminlogin() $a = 0 If RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa", "LmCompatabilityLevel", "REG_DWORD", "2") then $a += 1 If RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "AutoAdminLogon", "REG_SZ", "1") then $a += 1 If RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "ForceAutoLogon", "REG_SZ", "1") then $a += 1 If RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultUserName", "REG_SZ", guictrlread($username)) then $a += 1 If RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultPassword", "REG_SZ", guictrlread($Password)) then $a += 1 If RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultDomainName", "REG_SZ", guictrlread($Domain)) then $a += 1 If $a = 6 then MsgBox(64,"Success!","Autologon has been set.") else MsgBox(16,"Oops!","Autologon could not be set. Make sure you are a local Admin.") endif EndFunc ;==>setautoadminlogin Func removeautologin() $b = 0 If RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "AutoAdminLogon", "REG_SZ", "0") then $b += 1 If RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "ForceAutoLogon", "REG_SZ", "0") then $b += 1 If RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultUserName") then $b += 1 If RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultPassword") then $b += 1 If RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultDomainName") then $b += 1 If RegDelete("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa", "LmCompatabilityLevel") then $b += 1 If $b = 6 then MsgBox(64,"Success!","Autologon has been removed.") else MsgBox(16,"Oops!","Autologon could not be removed. Either Autologin was not set or you are not a local Admin.") endif EndFunc ;==>removeautologin Enjoy.
-
I'm trying to make a "sheet of glass" with shadow text drawn on it, the problem is that the shadow isn't transparent at all. I have absolutely no idea what I am doing wrong - being a noob with the WinAPI stuff. Screen-shot: Here's the script: ; Requires AutoIT beta 3.3.9.21 or newer #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Version=Beta #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> #include <Misc.au3> #include <WinAPIGdi.au3> If Not _WinAPI_DwmIsCompositionEnabled() Then MsgBox(BitOR(16, 4096), 'Error', 'Script requires Windows Vista or later with enabled Aero theme.') Exit EndIf Global Const $STM_SETIMAGE = 0x0172 Global Const $STM_GETIMAGE = 0x0173 Global $hDarkBK = GUICreate("Dark background", 400, 40, -1, -1, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_WINDOWEDGE)) GUISetBkColor(0) GUISetState(@SW_SHOW) Global $hGUI = GUICreate("DWM Test", 300, 20, -1, -1, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_WINDOWEDGE, $WS_EX_TOPMOST)) GUISetBkColor(0) _WinAPI_DwmExtendFrameIntoClientArea($hGUI) Global $Pic = GUICtrlCreatePic('', 0, 0, 300, 20) Global $hPic = GUICtrlGetHandle($Pic) Global $tRECT = _WinAPI_GetClientRect($hPic) Global $Width = DllStructGetData($tRECT, 3) - DllStructGetData($tRECT, 1) Global $Height = DllStructGetData($tRECT, 4) - DllStructGetData($tRECT, 2) Global $hDC = _WinAPI_GetDC($hPic) Global $hDestDC = _WinAPI_CreateCompatibleDC($hDC) Global $hBitmap = _WinAPI_CreateCompatibleBitmap($hDC, $Width, $Height) Global $hDestSv = _WinAPI_SelectObject($hDestDC, $hBitmap) Global $hSrcDC = _WinAPI_CreateCompatibleDC($hDC) Global $hSource = _WinAPI_CreateCompatibleBitmapEx($hDC, $Width, $Height, _WinAPI_SwitchColor(_WinAPI_GetSysColor($COLOR_3DFACE))) Global $hSrcSv = _WinAPI_SelectObject($hSrcDC, $hSource) Global $hFont = _WinAPI_CreateFont(20, 0, 0, 0, $FW_NORMAL, 0, 0, 0, $DEFAULT_CHARSET, $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $ANTIALIASED_QUALITY, $DEFAULT_PITCH, 'Arial') _WinAPI_SelectObject($hSrcDC, $hFont) _WinAPI_DrawShadowText($hSrcDC, "Why is the shadow not transparent?", 0xFFFFFF, 0x000000, 3, 3, $tRECT) _WinAPI_BitBlt($hDestDC, 0, 0, $Width, $Height, $hSrcDC, 0, 0, $MERGECOPY) _WinAPI_ReleaseDC($hPic, $hDC) _WinAPI_SelectObject($hDestDC, $hDestSv) _WinAPI_DeleteDC($hDestDC) _WinAPI_SelectObject($hSrcDC, $hSrcSv) _WinAPI_DeleteDC($hSrcDC) _WinAPI_DeleteObject($hSource) _WinAPI_DeleteObject($hFont) ; Set bitmap to control _SendMessage($hPic, $STM_SETIMAGE, 0, $hBitmap) Global $hObj = _SendMessage($hPic, $STM_GETIMAGE) If $hObj <> $hBitmap Then _WinAPI_DeleteObject($hBitmap) EndIf GUISetState(@SW_SHOW) Global $nMsg While 1 $nMsg = GUIGetMsg() If $nMsg = $GUI_EVENT_CLOSE Then Exit WEnd
-
Hello, why this code doesn't work in some versions of windows 7? HotkeySet(Chr(0x27),"func1") Func func1() MsgBox(0,"test","hello") EndFunc While True Sleep(10) WEnd When I press ' i should get a messagebox window but i don't.
-
Hello Everyone, Does anyone know whether or not AutoIt (a built-in function or a UDF) has a workaround or solution for dealing with Windows 7's Interactive Services Detection feature? For non-silent deployment packages (those that show some level of User Interface - UI) on Windows 7 (or Vista) how do you display a dialog box, progress bar, message, etc. to the user (Session 1) when deploying a software package that is being deployed by a software deployment solution that utilizes the Local System (SYSTEM) account (Session 0)? Regards, TX Techie
-
Hi all, When I use MsgBox on Windows 7, the OK button is not centered, Is this a known issue and is there a workaround ? Thanks MsgBox (0,"","OK button not centered")
-
RegKeyWrite will not create a key under HKLM in Windows 7 64 bit. Using HKLM64 does not work either. Funny, RegKeyWrite will create keys under HKCU without use of the "64" in windows 7 64 bit RegKeyRead will read from HKLM64 keys and sub keys. Does anybody know the game rules here. I would like to know the definitive rule / answer. Thanks
-
I could not find a User account script on these forums that was satisfactory, a On/Off setting is quite useless if it cant be configured, so i wrote this up. Should work on both x64 and x86 compiled scripts. Windows7 and Vista. Functions: Example: Script:
-
Hello, I hope someone would be able to assist with my problem. I've been using a program for a while on Windows XP. Now, we are switching to Windows 7 (32) and part of my scripts stopped working. I found that anything related to _GUICtrlListView_ is giving me trouble. The code to get the handle of the main window and the handle of the SysListView32 works. The following examples are trying to find an "Issue Number" of a multicolumn ListView. This example returns 0 (even when entering the handle manually and "Issue Number" exists). $Line = _GUICtrlListView_FindText($list, "Issue Number") This example returns blank (even when entering the handle and line manually). $IssueNumber = _GUICtrlListView_GetItemText($list, $Line, 1) Please let me know if any further information is needed. I've tested this on x64 and 32 bit Win7. Thanks!
-
This is a question for Systems Administrators of all kinds - those who manage software on a domain where users have restricted rights - and who have Windows 7 computers in their domain. How do you get around UAC to install Software or Certificates remotely and without user intervention? ... and without being logged in to the computer. ( There is no such thing as "right click and.." answers. We have over 3000 computers! ) I've tried scheduled tasks (schtasks.exe) with the /RL HIGHEST switch - no good. I've even looked into PowerShell 2.0 - but it is not what I need. Even with UAC disabled, some things still need the "Run As Administrator" privileges to actually install properly. Has Microsoft completely screwed Systems Administrators with this UAC ??
-
So I have a script that I wrote that opens a php page that has an input type box, a 'browse' button for the box, and a submit button. The 'browse' button does not appear if I am viewing the web page in the full version of IE, only the embedded one. This is not true on WinXP, only on Win7 (idk about Vista, skipped that). On WinXP, opening the page, using _IEAction(<Control>, "focus") and then Send("Text") works, and I can submit the form using _IEFormSubmit. However, on Win 7, using _IECreateEmbedded brings up a different kind of IE it seems? The same actions instead bring up a dialog box like I had clicked on the 'browse' button; _IEAction gives me an error at the _IEisObjType line. I can still click on it manually and type, but it's greyed out a little, unlike if I open it up from IE on the desktop. I tried to set compatibility mode in the settings, but it appears to make no difference. Working with the new AutoIt Beta version didn't seem to make a difference either. I can't use IECreate2 as referenced elsewhere as it prevents you from using the username/password in the URL if you do, whereas IECreateEmbedded allows it. (yes, bad practice I know, but it's internal for an internal site). I also can't use the alternate method of clicking on the button with the mouse as the pop up box halts the script in entirety.