-
Posts
35 -
Joined
-
Last visited
About ct253704
- Birthday August 8
Profile Information
-
Location
Charlotte, NC
ct253704's Achievements

Seeker (1/7)
0
Reputation
-
Changing the Win10 Login Screen
ct253704 replied to ct253704's topic in AutoIt General Help and Support
Haha. Thanks for checking guys, back to the drawing board! If I figure this out i'll post it back here. Stupid Windows 10.. -
Changing the Win10 Login Screen
ct253704 replied to ct253704's topic in AutoIt General Help and Support
Thanks Earthshine, i'll see if I can't test it today. However, from the looks of it that may only change the lock screen and not the login screen. I'll let you know. -
Changing the Win10 Login Screen
ct253704 replied to ct253704's topic in AutoIt General Help and Support
Unfortunately that only works in Enterprise and not Pro. -
We're working on moving to Windows 10 Pro, unfortunately, as a lot of the new chips don't support Win7 drivers. Part of my internal script for PC deployment automatically set the logon screen in Windows 7 to a customized agency picture. The old script modified the registry and the oobe folder. However, with the Win10 infrastructure being very different, apparently a binary file needs to be edited in order to change the login (not LOCK) screen. The file is: C:\Windows\SystemResources\Windows.UI.Logon\Windows.UI.Logon.pri For this particular screen the group policy settings don't work either. Has anyone figured out a way to set this screen via script?
-
ct253704 reacted to a post in a topic: Acquiring Class/ID of Hidden Google Slides button
-
Acquiring Class/ID of Hidden Google Slides button
ct253704 replied to ct253704's topic in AutoIt General Help and Support
Hm, I originally didn't use those because you can't use _IEPropertySet with the "Fullscreen" property. However I did some looking after you said that and realized there's another property called "Theatermode" that did exactly what I wanted it to do. Works like a charm now, thanks Danp2. Here's that section of code for reference: $oIE = _IECreate ($url, 1) $hIE = _IEPropertyGet($oIE, "hwnd") WinSetState($hIE, "", @SW_MAXIMIZE) WinWaitActive($Title) Sleep(1000) While Local $FS = _IEPropertyGet($oIE, "theatermode") IF $FS = 0 Then _IEPropertySet($oIE, "theatermode", 1) EndIf WinActivate($title) WinWaitActive($title) Send("{F5}") Sleep(100000) Wend -
Acquiring Class/ID of Hidden Google Slides button
ct253704 replied to ct253704's topic in AutoIt General Help and Support
I'm doing all of this in IE due to certain restrictions placed on PCs in our domain environment. I have noticed the keystroke will work fine on some laptops so it is possible that it's some sort of addon or hardware issue, but i've tried booting IE into clean mode without addons and still can't seem to get it to function properly. -
Good morning, I am struggling to find a way to force a ControlClick on a particular hidden element within a Google Slides window. Using Au3Info doesn't work as the hidden text won't appear when attempting to gather the data. Using inspect element will show the class/title of the button, but using the class in the ControlClick function doesn't seem to do anything. Since this script is going to be running on multiple machines with different resolutions, MouseClick isn't a good option either. Can someone help me figure out how to click this full screen button? One more note - It says "Ctrl + Shift + F" for full screen, however sending that combo doesn't work - nor does actually using those keys on the keyboard. Possible conflict with AutoIT hotkeys? Here's some sample code / screenshots to help: ControlClick($Title, "", "[CLASS:punch-viewer-icon punch-viewer-full-screen goog-inline-block]")
-
Hey all, I'm just trying to accomplish a simple goal that allows us to display streaming slides via Google Slides that then update every 5 minutes. Note that in this script I have it set as 5 seconds for testing. I need the following to happen: 1. If "News" slides are already open, then just refresh (F5) every 5 minutes 2. If slides are not open, then create them before beginning the 5 minute refresh loop 3. If News is open but it's not the active screen, then make it the active screen, bring it to the front, and continue looping the refresh. If it's closed, then reopen it and then continue refresh loop. I made an edit to the Else statement and its functional enough for #1 and #2, but incorporating #3 doesn't work with the code below. If the website is closed or if the script is cancelled and run again, it will create the window again. I'm sure this is just an order of operations thing and moving things out of or into While statements. I'm just not sure how to do a title check within a while statement, and if false, jump out of the while statement back to the beginning and then run the script again. ALmost like a "GoTo" function. #include <IE.au3> HotKeySet("!{x}", "ExitNow") Opt("WinTitleMatchMode", 3) Global $url = "URLHERE" Global $title = WinGetTitle("News", "") While 1 If $Title <> "" Then While 2 WinActivate($title) WinWaitActive($title) Send("{F5}") Sleep(5000) Wend Else $oIE = _IECreate ($url, 1) $hIE = _IEPropertyGet($oIE, "hwnd") WinSetState($hIE, "", @SW_MAXIMIZE) WinWaitActive($Title) Sleep(1000) Send("{LCTRL}{LSHIFT}{F}") ; Should make Google Slides full screen. Issue with Google's hotkeys causing this not to work While 3 WinActivate($title) WinWaitActive($title) ; This tells the script to not send the refresh key (F5) until the window has appeared. Send("{F5}") Sleep(5000) Wend EndIf WEnd Func ExitNow() Exit EndFunc
-
Multiple Command Issue - Cannot Find Specified Path
ct253704 replied to ct253704's topic in AutoIt General Help and Support
Bonus! That's a clever way to return the filepath. I'll test that out. May I ask what the @CRLF will do in this case, exactly? I've never used that macro. Does it just ensure that the "user pref" portion is put in a line of its own? -
ct253704 reacted to a post in a topic: Multiple Command Issue - Cannot Find Specified Path
-
I'm having some issues converting a batch file to be used in a script of mine. The batch file was pulled from Stack Overflow with small modifications and works by itself, but when I convert to AutoIT it gets about halfway through and then gives the error "Cannot find the path specified". All it does is set the firefox homepage, though i'd like to expand the settings altered in the prefs.js file if I can get this to work. Batch File: cd /D "%APPDATA%\Mozilla\Firefox\Profiles" cd *.default* set ffile=%cd% cd %ffile% echo user_pref("browser.startup.homepage", "https://www.google.com");>>"%ffile%\prefs.js" set ffile= cd %windir% AutoIT Code RunWait(@ComSpec & ' /k ' & 'cd /D "%APPDATA%\Mozilla\Firefox\Profiles"&&cd *.default*&&set ffile=%cd%&&cd %ffile%&&echo user_pref("browser.startup.homepage", "https://www.google.com");>>"%ffile%\prefs.js"&&set ffile=&&cd %windir%')Also to note the batch file doesn't work if each line is ran individually via command prompt. Maybe I should change one of the && in the code?
-
Registry Change and System32 problems
ct253704 replied to ct253704's topic in AutoIt General Help and Support
Thanks for your patience jguinch. I moved to the 64-bit laptop for testing at the moment and with your suggestions it's almost fully functional. The only part that isn't functional is the actual opening of the background folder with ShellExecute. (Edit: This part honestly isn't that big of a deal, I could just Windows Key + L to see if it took effect..) However, the image DOES copy after setting the native directory properly (didn't think about that when swapping machines earlier, thank you). In terms of rights, I have full rights as a domain admin and signed in with the domainadministrator account. Current code with comments: #RequireAdmin #include <File.au3> #include <MsgBoxConstants.au3> #include <FileConstants.au3> Call ("RegChange") Call ("DefaultSet") Func RegChange () $RegExists = RegRead ("HKEY_LOCAL_MACHINE64\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background", "OEMBackground") ;returns 1 MsgBox ($MB_SYSTEMMODAL, "Output", $RegExists) $RegDelete = RegDelete ("HKEY_LOCAL_MACHINE64\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background", "OEMBackground") ;success If $RegDelete = 1 Then MsgBox (0, "Success", "Value Deleted") If $RegDelete = 0 or $RegDelete = 2 Then Msgbox (0, @error, "Error Deleting Key") $RegCreate = RegWrite ("HKEY_LOCAL_MACHINE64\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background", "OEMBackground", "REG_DWORD", "1") ;success If $RegCreate = 0 then msgbox (0, "Failure", "Unable to set background registry value at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background") If Not($RegCreate=0) Then msgbox (0, "Success", "Background registry value set") EndFunc Func DefaultSet () $sSystem32 = @SystemDir If StringInStr(@OSArch, "64") Then $sSystem32 = @windowsdir & "\sysnative" If NOT FileExists ($sSystem32 & "\oobe\INFO\backgrounds") Then DirCreate($sSystem32 & "\oobe\INFO\backgrounds") ;success If FileExists ($sSystem32 & "\oobe\INFO\backgrounds") Then If FileCopy ("\\fileserver01\backgroundDefault.jpg", $sSystem32 & "\oobe\INFO\backgrounds", 1) Then ;success MsgBox (0, "Success", "Login Image Set") ShellExecute($sSystem32 & "\oobe\INFO\backgrounds") ;This still fails with the error "Location is unavailable" EndIf Else MsgBox (16, "No Path", "Unable to create the Backgrounds path") EndIf EndFunc -
Registry Change and System32 problems
ct253704 replied to ct253704's topic in AutoIt General Help and Support
No, this is a 32-bit machine. However, that made me curious so I took the script to a 64 bit machine and added the 64 suffix and the first function actually worked on the 64 bit machine. Second function still non-functional on both machines, however and both still not functional on a 32bit machine. -
Registry Change and System32 problems
ct253704 replied to ct253704's topic in AutoIt General Help and Support
This was just something I forgot to remove. Originally I had it opening regedit to the value so I could see if it was changed. Just forgot to remove it. Thanks for the tips czardas, made the changes. In the help file it actually is ($FC_OVERWRITE + $FC_CREATEPATH) so I didn't think to use BitOr. After making the changes. All of the same problems still persist except for $Regdelete returning both errors now since the OR syntax was fixed. Current code: #include <File.au3> #include <MsgBoxConstants.au3> #include <FileConstants.au3> Call ("RegChange") Call ("DefaultSet") Func RegChange () $RegExists = RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background", "OEMBackground") ;returns 1 MsgBox ($MB_SYSTEMMODAL, "Output", $RegExists) $RegDelete = RegDelete ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background", "OEMBackground") ;now only returns success even though it isn't deleted. If $RegDelete = 1 Then MsgBox (0, "Success", "Value Deleted") If $RegDelete = 0 or $RegDelete = 2 Then Msgbox (0, @error, "Error Deleting Key") $RegCreate = RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background", "OEMBackground", "REG_DWORD", "1") ;returns success even though it isn't changed to 1 after refresh If $RegCreate = 0 then msgbox (0, "Failure", "Unable to set background registry value at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background") If Not($RegCreate=0) Then msgbox (0, "Success", "Background registry value set") EndFunc Func DefaultSet () $Exists = FileExists (@windowsdir & "\system32\oobe\INFO\backgrounds") ;returns 1 as the directory does exist. If $Exists=1 Then $Copy = FileCopy ("\\fileserver01\disks\cody\backgroundDefault.jpg", @windowsdir & "\system32\oobe\INFO\backgrounds", BitOr($FC_OVERWRITE, $FC_CREATEPATH)) If $Exists=0 Then MsgBox ($MB_SYSTEMMODAL, "No Path", "Backgrounds path non-existent") If $Copy = 1 Then MsgBox ($MB_SYSTEMMODAL, "Success", "Login Image Set") If Not ($Copy=1) Then Msgbox ($MB_SYSTEMMODAL, "Failure", "Unable to copy login image") ;Get this error even though i'm 100% sure on the path of the image and the destination. ShellExecute(@windowsdir & "\system32\oobe\INFO\backgrounds") ;This confuses me as, even though FileExists finds the directory, ShellExecute will not open it. EndFunc -
Can anyone tell me what's going on with the script below. I am logged in as domain admin on an admin PC for testing. Maybe all the weird conflicting errors have to do with it being in use or protected? Just trying to update the login screens with the new company logo as asked. #include <File.au3> #include <MsgBoxConstants.au3> #include <FileConstants.au3> Call ("RegChange") Call ("DefaultSet") Func RegChange () $RegExists = RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background", "OEMBackground") ;returns 1 MsgBox ($MB_SYSTEMMODAL, "Output", $RegExists) $RegDelete = RegDelete ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background", "OEMBackground") ;returns BOTH value deleted and error deleting Value as specified below. If $RegDelete = 1 Then MsgBox (0, "Success", "Value Deleted") If $RegDelete = 0 or 2 Then Msgbox (0, @error, "Error Deleting Value") $RegCreate = RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background", "OEMBackground", "REG_DWORD", "1") ;returns success even though it isn't changed to 1 after refresh If $RegCreate = 0 then msgbox (0, "Failure", "Unable to set background registry value at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background") If Not($RegCreate=0) Then msgbox (0, "Success", "Background registry value set") Exit EndFunc Func DefaultSet () $Exists = FileExists (@windowsdir & "\system32\oobe\INFO\backgrounds") ;returns 1 as the directory does exist. If $Exists=1 Then $Copy = FileCopy ("\\fileserver01\backgroundDefault.jpg", @windowsdir & "\system32\oobe\INFO\backgrounds", $FC_OVERWRITE + $FC_CREATEPATH) If $Exists=0 Then MsgBox ($MB_SYSTEMMODAL, "No Path", "Backgrounds path non-existent") If $Copy = 1 Then MsgBox ($MB_SYSTEMMODAL, "Success", "Login Image Set") If Not ($Copy=1) Then Msgbox ($MB_SYSTEMMODAL, "Failure", "Unable to copy login image") ;Get this error even though i'm 100% sure on the path of the image and the destination. ShellExecute(@windowsdir & "\system32\oobe\INFO\backgrounds") ;This confuses me as, even though FileExists finds the directory, ShellExecute will not open it and instead asks "Which Program would you like to use..." EndFunc
-
Once again, thank you @JLogan3o13 I had to modify it a bit as each column it would move down a row giving me a "stair" effect, haha, but alas it's working. I know some of the code is fluff and I will tidy it up later after Christmas, but I really would not have figured that out on my own. Even after looking through the UDF some of that still confused me (Mostly the Activate, SpecialCells, etc). Thanks for all your help! Working code at the moment: Func Export() Local $CreateExcel = _Excel_Open() Local $OpenWorkbook = _Excel_BookOpen($CreateExcel, "\\fileserver01\Budget Meetings.xlsx") Local $OpenSheet = $OpenWorkbook.ActiveSheet $TeamMemberValue = GUICtrlRead($TeamMemberInput) ;Get the value in the TeamMember Input Box $MemberArray = _Excel_RangeFind($OpenWorkbook, GUICtrlRead($TeamMember)) ;Returns a 2D Array, with index [0][2] showing the range you want $sColumn = StringMid($MemberArray[0][2], 2, 1) $OpenSheet = $OpenWorkbook.Worksheets(1) $Range = $OpenSheet.UsedRange $Range.SpecialCells($xlCellTypeLastCell).Activate $newRow = $CreateExcel.ActiveCell.Row + 1 _Excel_RangeWrite($OpenWorkbook, Default, $TeamMemberValue, $scolumn & $newRow) $BudgeterValue = GUICtrlRead($BudgeterInput) $BudgeterArray = _Excel_RangeFind($OpenWorkbook, GUICtrlRead($Budgeter)) $sColumn = StringMid($BudgeterArray[0][2], 2, 1) $OpenSheet = $OpenWorkbook.Worksheets(1) $Range = $OpenSheet.UsedRange $Range.SpecialCells($xlCellTypeLastCell).Activate $samerow = $CreateExcel.ActiveCell.Row _Excel_RangeWrite($OpenWorkbook, Default, $BudgeterValue, $scolumn & $sameRow) $TopicValue = GUICtrlRead($TopicInput) $TopicArray = _Excel_RangeFind($OpenWorkbook, GUICtrlRead($Topic)) $sColumn = StringMid($TopicArray[0][2], 2, 1) $OpenSheet = $OpenWorkbook.Worksheets(1) $Range = $OpenSheet.UsedRange $Range.SpecialCells($xlCellTypeLastCell).Activate _Excel_RangeWrite($OpenWorkbook, Default, $TopicValue, $scolumn & $sameRow) $DepartmentValue = GUICtrlRead($DepartmentInput) $DepartmentArray = _Excel_RangeFind($OpenWorkbook, GUICtrlRead($Department)) $sColumn = StringMid($DepartmentArray[0][2], 2, 1) $OpenSheet = $OpenWorkbook.Worksheets(1) $Range = $OpenSheet.UsedRange $Range.SpecialCells($xlCellTypeLastCell).Activate _Excel_RangeWrite($OpenWorkbook, Default, $DepartmentValue, $scolumn & $sameRow) $DateValue = GUICtrlRead($DateInput) $DateArray = _Excel_RangeFind($OpenWorkbook, GUICtrlRead($Date)) $sColumn = StringMid($DateArray[0][2], 2, 1) $OpenSheet = $OpenWorkbook.Worksheets(1) $Range = $OpenSheet.UsedRange $Range.SpecialCells($xlCellTypeLastCell).Activate _Excel_RangeWrite($OpenWorkbook, Default, $DateValue, $scolumn & $sameRow) $TimeValue = GUICtrlRead($TimeInput) $TimeArray = _Excel_RangeFind($OpenWorkbook, GUICtrlRead($Time)) $sColumn = StringMid($TimeArray[0][2], 2, 1) $OpenSheet = $OpenWorkbook.Worksheets(1) $Range = $OpenSheet.UsedRange $Range.SpecialCells($xlCellTypeLastCell).Activate _Excel_RangeWrite($OpenWorkbook, Default, $TimeValue, $scolumn & $sameRow) EndFunc