Jump to content
Jon

[Windows 10] XBox One Controller

Recommended Posts

Jon

My XBox One controller wouldn't work after upgrading to Windows 10 even though the driver looked OK and it was detected in Control Panel. This fixed it:

  • Open Device Manager
  • Right-click on the XBox controller (right at the bottom of the list)
  • Select Update Driver Software
  • Select Browse
  • Select Let me pick
  • Select Microsoft Xbox One Controller

There are are a couple of choices in there:

  • Xbox One Controller - Doesn't work, this was the default selected driver 
  • Microsoft Xbox One Controller works
Edited by Jon

Share this post


Link to post
Share on other sites
kaotkbliss

I know it's not an xbox one controller, but I've no experience at all with Xboxes.

Anyways, I had picked up this controller to go with an xbox 360 but it's no longer needed for the 360 so I figured I would use it for my PC.

It doesn't have any usb cord or anything and takes regular batteries so I'm trying to connect it to the pc wirelessly.

I have a Bluetooth dongle that works fine for everything else but it just can't seem to find the controller. I went to microsofts download center and downloaded the windows drivers for the controller, but that doesn't seem to do anything to help with the pairing.

 

any suggestions?

 

the controller

http://www.amazon.com/gp/product/B00EFRNG0A?psc=1&redirect=true&ref_=oh_aui_detailpage_o01_s00

the bluetooth dongle

http://www.amazon.com/gp/product/B004H6NCJ4?psc=1&redirect=true&ref_=oh_aui_detailpage_o05_s00


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites
kaotkbliss

Oh, well that stinks. What if I get a usb cable for it, something like this?

http://www.amazon.com/Xbox-360-Play-Charge-Cable-White/dp/B0011E4J7O/ref=sr_1_1?ie=UTF8&qid=1438538199&sr=8-1&keywords=xbox+360+controller+usb+cable

*edit*

I should mention that MS had 2 different drivers for the 360 controller, 1 wired and 1 wireless so I guess some do work and maybe some don't? or maybe you need to connect it via USB first? (I think that's how you have to do the ps3 controllers)

Edited by kaotkbliss
Add info

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites
iamtheky

What are you playing with your controller?


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites
Jon

The 360 wireless controller with the usb lead only used the lead for charging - there's no actual data link. i.e the one that I got with my 360. You need a fully wired 360 one. 

The Xbox one wireless controller plus lead works fine though. It's great in Witcher 3 for example. 

Share this post


Link to post
Share on other sites
jvanegmond

@kaotkbliss before you run off to buy a wired 360 controller, there is limited compatibility for PC with the PS4 Dual Shock controller and the extremely promising Steam controller is coming out November this year.

Share this post


Link to post
Share on other sites
Jon

Better off buying the Xbox one controller if you have to buy anything. All the PC games are optimised for its layout. shadows of mordor, witcher, gta, etc.  One less thing to mess about with while trying to get a pc game to run optimally.  It's a great controller as well :)

Edited by Jon

Share this post


Link to post
Share on other sites
kaotkbliss

I already have 1 wired controller specifically for pc that's set up just like a playstation controller. Just figured since I had the 360 controller that wasn't being used for anything...

But I did some searching last night and it seems in order to use a wireless 360 controller, you need one of these:

http://www.amazon.com/Wireless-Gaming-Receiver-Xbox-xbox360-Compact/dp/B0076HD2W8/ref=sr_1_1?ie=UTF8&qid=1438606541&sr=8-1&keywords=xbox+360+wireless+receiver

via the instructions here:

http://www.digitaltrends.com/gaming/how-to-connect-your-xbox-360-controller-to-a-pc/

 

 


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites
jvanegmond

Better off buying the Xbox one controller if you have to buy anything. All the PC games are optimised for its layout. shadows of mordor, witcher, gta, etc.  One less thing to mess about with while trying to get a pc game to run optimally.  It's a great controller as well :)

The Steam controller will have exactly the same layout - for compatibility reasons.

Share this post


Link to post
Share on other sites
BinaryBrother

Microsoft has stated that they can kill pirated software, games, and non-genuine or modified hardware. Personally, I have a controller clone that I got super-cheap from one of those Chinese websites [AliExpress?] and I've been waiting for it to stop working... :'(

Share this post


Link to post
Share on other sites
MagnumXL

To use the wireless xbox360 controller with a modern windows platform you need a specific dongle made for the task.

HDE USB Wireless Receiver Compatible with Xbox 360 Controllers for Computer PC Gaming

  - or -

Microsoft Xbox 360 Wireless Receiver for Windows

The device needed for the Xbox One Controller has not been released yet..

Microsoft Xbox Wireless Adapter for Windows

For now the any Xbox One controller works with windows when tethered via a micro to standard usb cable. Many people report having issues with 3rd party or "charging" cables though.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • ur
      By ur
      When I compiled my script or any script to exe using 32 bit compiler and ran on 32 bit machine, I am getting below error.
       

       
      But it is 32 bit only.
       
      And, for testing, I disabled smart screen also, but same issue.
      Please suggest.
       
    • sadakathullah
      By sadakathullah
      Hi All, I am new to AutoIT and exploring options to use it in my organization. I tried couple of examples and it is fantastic. I am trying to run restrictions test in a pc to see if certain options are disabled like print screen, mstsc etc. I could not get a hang of it. Any help is much appreciated.
    • somebadhat
      By somebadhat
      THANKS TO RASIM, MARTIN, AND BOOMINGRANNY FOR TEACHING ME HOW TO DO THIS. 
      SCRIPT ONE WORKS ON MY PLATFORM.  IT CREATED THE ATTACHMENTS.
      IMPROVEMENTS ARE WELCOMED. 
      SEE BOLD TEXT BELOW.
      PURPOSE:
      WRITE AN AUTOIT3 SCRIPT THAT WHEN RUN IN A WINDOWS SCHEDULED TASK WILL PRODUCE SCREENSHOTS OF THE DESKTOP, START MENU, QUICK ACCESS MENU, AND DEVICE MANAGER WITHOUT INTERACTION.  IF MULTIPLE SHOTS ARE REQUIRED THE SHOTS CAN BE COMBINED STACKED OR SIDE-BY-SIDE.  SCRIPTS ARE WRITTEN TO RUN ON WINDOWS 10.0.17134.286 PRO 64-BIT IN AN ACCOUNT WITH ADMIN PRIVILEGES IN A WINDOW WITH ADMIN PRIVILEGES AND AUTOIT3 v3.3.14.5
      PROCEDURE:
      WHAT ARE THE COORDINATES OF THE SCREENSHOTS?
      WHERE DO YOU WANT TO CREATE THE SHOTS?
      WHAT DO YOU WANT TO CALL THE SHOTS?
      TAKE THE SHOTS.
      PROCESS THE SHOTS:
      WHERE ARE THEY? WHAT ARE THEY CALLED? WHERE DO YOU WANT THEM TO GO? WHAT DO YOU WANT TO CALL THEM? DO YOU WANT THEM STACKED, SIDE-BY-SIDE, OR NEITHER? TWEAK TO ELIMINATE ERRORS.
      RESULTS: SCRIPT TWO I'VE INCORPORATED THE SUGGESTION OF @BOOMINGRANNY AND MADE A SECOND SCRIPT.  MY WAY OF FINDING THE SHOT COORDINATES OF THE DEVICE MANAGER DID NOT WORK WHEN STARTING THE DEVICE MANAGER THIS WAY . #include <Coordinates.au3> finds incorrect coordinates.  They are shifted down ~50px.  Does not work on menus exposed by right clicking or the start menu. WORK NEEDS TO BE DONE TO ELIMINATE THE BLACK BAR WHEN THE SHOTS ARE NOT THE SAME HEIGHT and ARE BEING DISPLAYED SIDE-BY-SIDE. 
      SEE    If $Position = "right"
      CONCLUSION:
      UNFINISHED AS OF THIS TIME.
      MAKE ROBUST.  A ROBUST SCRIPT FAILS LESS THAN 1% OF THE TIME AND RUNS ON WINDOWS 10 64-BIT THROUGH WINDOWS XP 32-BIT SP0 IN AN ACCOUNT WITH STANDARD/USER/LIMITED PRIVILEGES IN A WINDOW WITH STANDARD/USER/LIMITED PRIVILEGES.   IT WOULD BE NICE TO MAKE THE SCRIPT FASTER AND LIGHTER.

      RESULTS ATTACHED. SCRIPT ONE:
      ;; AUTOIT3 v3.3.14.5 SCRIPT ;; PURPOSE: ; WRITE AN AUTOIT3 SCRIPT THAT WHEN RUN IN A WINDOWS SCHEDULED TASK WILL PRODUCE SCREENSHOTS OF THE WINDOWS 10 DESKTOP, START MENU, QUICK ACCESS MENU, AND DEVICE MANAGER WITHOUT INTERACTION. ;; SEE https://www.autoitscript.com/forum/topic/196256-screenshot-win10-desktop-quick-access-device-manager-start-menu-automated-shots-stacked-or-side-by-side-requires-admin/ ;; MUST BE RUN WITH ADMIN PRIVILEDGES. NOT ROBUST YET. ;; SCREENSHOT WIN10 DESKTOP, QUICK ACCESS, DEVICE MANAGER AND START MENU. ;; MULTIPLE SHOTS JOINED STACKED, SIDE-BY-SIDE, OR NEITHER. SEE SIDE-BY-SIDE ;; WORK NEEDS TO BE DONE TO ELIMINATE THE BLACK BAR WHEN THE SHOTS ARE NOT THE SAME HEIGHT AND ARE BEING DISPLAYED SIDE-BY-SIDE. ;; MY GUESS THE EASIEST THING TO DO WOULD BE TO TURN IT WHITE. ;; YOU WILL HAVE TO TELL IT WHERE YOUR TASKBAR EXPLORER SHORTCUT IS. SEE MouseClick ( "right", 74, 748, 1, 0) ;; YOU WILL HAVE TO TELL IT WHERE TO PROCESS AND MOVE THE SHOTS. SEE MULTIPLE OF $ZDIR, $ZNAME, FQPN SEE $outputFile ;; ;; IMPROVEMENTS ARE WELCOMED ;; FIND LIST OF ENVIRONMENT VARIABLES NAMES ;; AUTOIT3 HELP File ;; "C:\Program Files (x86)\AutoIt3\AutoIt.chm" ;; SEARCH FOR MACRO REFERENCE AND MACRO REFERENCE - DIRECTORY ;; THANKS TO RASIM, MARTIN, AND BOOMINGRANNY AT AUTOITSCRIPT.COM ; https://www.autoitscript.com/forum/topic/80896-join-two-bitmap-images/ ; https://www.autoitscript.com/forum/topic/80896-join-two-bitmap-images/?do=findComment&comment=581214 ; https://www.autoitscript.com/forum/topic/80896-join-two-bitmap-images/?do=findComment&comment=581372 ; https://www.autoitscript.com/forum/topic/196256-screenshot-win10-desktop-quick-access-device-manager-start-menu-automated-shots-stacked-or-side-by-side-requires-admin/ ; https://www.autoitscript.com/forum/topic/196256-screenshot-win10-desktop-quick-access-device-manager-start-menu-automated-shots-stacked-or-side-by-side-requires-admin//?do=findComment&comment=1407181 ;; "C:\Program Files (x86)\AutoIt3\AutoIt3_x64.exe" "F:\MYAPPS\WINDOWS\screenshots1.au3" ;; Screenshot Win10 desktop, quick access, device manager, start menu. Automated. Shots stacked or side-by-side. Requires admin. ; BEGIN How to get 4 Screen Coordinates just by dragging a Rectangle ; download Coordinates.au3 https://www.autoitscript.com/forum/applications/core/interface/file/attachment.php?id=59228 ; END How to get 4 Screen Coordinates just by dragging a Rectangle ; BEGIN CAPTURE ; https://www.autoitscript.com/forum/topic/8377-capture-screen-dll/ ; Capture full screen ; Fist parameter - filename, last - jpeg quality. #include <ScreenCapture.au3> ; BEGIN THE FOLLOWING REQUIRED TO SHOOT THE ENTIRE DEVICE MANAGER IN ONE SHOT ; https://www.autoitscript.com/forum/topic/196256-screenshot-win10-desktop-quick-access-device-manager-start-menu-automated-shots-stacked-or-side-by-side-requires-admin//?do=findComment&comment=1407181 ; credit for the screenshot scrolling code goes to monoscout999 #include <ScrollBarsConstants.au3> #include <WindowsConstants.au3> #include <process.au3> #include <GuiTreeView.au3> #include <GuiScrollBars.au3> #include <WinAPISysWin.au3> ; END THE FOLLOWING REQUIRED TO SHOOT THE ENTIRE DEVICE MANAGER IN ONE SHOT ; BETTER RESULTS IF AT LEASE ONE EXPLORER WINDOW IS OPEN Run("explorer.exe", "", @SW_SHOWMINIMIZED) ; Run( @comspec & " /c start explorer.exe","", @SW_SHOWMINIMIZED) ; Run( @comspec & " /c start explorer.exe","", @SW_HIDE) WinWait("My Computer") ; WinActivate("My Computer") ; WinSetState("My Computer", "", @SW_MAXIMIZE) ; wake the monitor, show the desktop, wait X milliseconds ; Send(" ") send( "#d" ) Sleep( 500 ) ; QUICK ACCESS ; https://www.autoitscript.com/autoit3/docs/functions/MouseClick.htm MouseClick ( "right", 74, 748, 1, 0 ) ; right click windows explorer shortcut on taskbar to open context menu Sleep( 250 ) send("{PGDN}") ; expose the most pinned items Sleep( 250 ) send("{down}") ; expose the most pinned items $ZDIR=@homeDrive & "\Users\Default\Desktop\UPDATE" ;where does the screenshot go $ZNAME="\quick-access.jpg" ;what will its name be $ZTOPX=0 $ZTOPY=0 $ZBOTTOMX=250 $ZBOTTOMY=615 Sleep( 500 ) ScreenShot() ; Sleep( 2000 ) MouseClick ( "left", 74, 748, 1, 0 ) ; left click windows explorer shortcut on taskbar to close context menu send( "#d" ) ; show desktop ; exit ; START MENU Sleep( 500 ) send("{LWIN}") ;OPEN START MENU $ZDIR=@tempDir ;where does the screenshot go $ZNAME="\start-menu1.jpg" ;what will its name be $ZTOPX=315 $ZTOPY=139 $ZBOTTOMX=1285 $ZBOTTOMY=660 Sleep( 1250 ) ScreenShot() ; BEGIN WEAK POINT send("{tab}"); COMBINING TABS BREAKS SCRIPT Sleep( 120 ) send("{tab}") Sleep( 120 ) send("{tab}") Sleep( 500 ) send("{down 8}"); move to the bottom of the start menu to take the next screenshot. operates on the first column of shortcuts. will only go to the bottom of it. add send("{right}") after the last tab to operate on another column. ; END WEAK POINT ; $ZDIR=@tempDir ;where does the screenshot go $ZNAME="\start-menu2.jpg" ;what will its name be $ZTOPX=315 $ZTOPY=409 $ZBOTTOMX=1285 $ZBOTTOMY=730 Sleep( 125 ) ScreenShot() send("{LWIN}") ; CLOSE THE START MENU ; DESKTOP $ZDIR=@homeDrive & "\Users\Default\Desktop\UPDATE" ;where does the screenshot go $ZNAME="\desktop.jpg" ;what will its name be $ZTOPX=0 $ZTOPY=0 $ZBOTTOMX=-1 $ZBOTTOMY=-1 Sleep( 125 ) ScreenShot() ; BEGIN OPEN DEVICE MANAGER MAXIMIZED ; CHOOSE YOUR POISON Run( @comspec & " /c start devmgmt.msc","", @SW_HIDE) WinWait("Device Manager") WinActivate("Device Manager") WinSetState("Device Manager", "", @SW_MAXIMIZE) ; ; BEGIN SHOOTING THE DEVICE MANAGER THE FOLLOWING WAY REQUIRED: ; 1. IT BE DONE AT THE BEGINNING OF THE SCRIPT. ; 2. MORE WORK TO FIND THE COORDINATES: ; https://www.autoitscript.com/forum/topic/165325-how-to-get-4-screen-coordinates-just-by-dragging-a-rectangle/?do=findComment&comment=1206830 ; modified and saved as "C:\Program Files (x86)\AutoIt3\Include\Coordinates.au3" ; download Coordinates.au3 https://www.autoitscript.com/forum/topic/196256-screenshot-win10-desktop-quick-access-device-manager-start-menu-automated-shots-stacked-or-side-by-side-requires-admin/ ; Run("control /name Microsoft.DeviceManager") ; script must be run with admin privileges ; WinWaitActive("Device Manager") ; $WinHndl = WinGetHandle("Device Manager") ; WinMove($WinHndl,"",-4,0,@DesktopWidth+10,@DesktopHeight) ; MAKE ADJUSTMENTS HERE ; #include <Coordinates.au3> ; END SHOOTING THE DEVICE MANAGER THE FOLLOWING WAY REQUIRED: ; ; Run("mmc devmgmt.msc") ; WinActivate ( "Device Manager", "" ) ; Sleep( 125 ) ; WinSetState("[ACTIVE]", "", @SW_MAXIMIZE) ; Sleep( 125 ) ; WinSetState("Device Manager", "", @SW_MAXIMIZE) ; END OPEN DEVICE MANAGER MAXIMIZED Sleep( 1000 ) Send("{TAB}") Sleep( 250 ) send("{down 4}") Sleep( 250 ) send("{right}") ;DISK DRIVES Sleep( 250 ) send("{down2}") Sleep( 250 ) send("{right}") ;DISPLAY ADAPTERS Sleep( 250 ) send("{down 5}") Sleep( 250 ) send("{right}") ;IDE ATA/ATAPI CONTROLLERS Sleep( 250 ) send("{down 6}") Sleep( 250 ) send("{right}") ;NETWORK ADAPTERS $ZDIR=@tempDir ;where does the screenshot go $ZNAME="\device-manager1.jpg" ;what will its name be $ZTOPX=2 $ZTOPY=77 $ZBOTTOMX=272 $ZBOTTOMY=382 Sleep( 250 ) ScreenShot() send("{down 15}") Sleep( 250 ) send("{right}") ;SOUND, VIDEO, AND GAME CONTROLLERS Sleep( 250 ) send("{down 7}") ;MOVES NETWORK ADAPTERS TO THE $ZTOPY=273 POSITION $ZDIR=@tempDir ;where does the screenshot go $ZNAME="\device-manager2.jpg" ;what will its name be $ZTOPX=2 $ZTOPY=273 $ZBOTTOMX=272 $ZBOTTOMY=638 Sleep( 250 ) ScreenShot() Sleep( 1000 ) ; https://www.autoitscript.com/forum/topic/196256-screenshot-win10-desktop-quick-access-device-manager-start-menu-automated-shots-stacked-or-side-by-side-requires-admin//?do=findComment&comment=1407181 ; credit for the screenshot scrolling code goes to monoscout999 ; screenshot of everything in the device manager $outputFile = @HomeDrive&"\Users\Default\Desktop\UPDATE\device-manager2.jpg" ;get a handle of things $WinHndl = WinGetHandle("Device Manager") $Treeview = ControlGetHandle("Device Manager","","[Class:SysTreeView32]") ;expand the treeview control _GUICtrlTreeView_Expand($Treeview) MouseMove(300,200) MouseWheel("up",100) Sleep(250) ;Get Edit1 Vertical Scroll Min/Max range and page size. $aScrollRange = _GUIScrollBars_GetScrollRange($Treeview, $SB_VERT) $iPageSize = _GUIScrollBars_GetScrollInfoPage($Treeview, $SB_VERT) $iPages = Round($aScrollRange[1] / $iPageSize) ;get treeview control size $aTreeviewPos = ControlGetPos($WinHndl,"",$Treeview) ;Capture $scrollBarSize = 20 $hDC = _winapi_GetDC($Treeview) $hCDC = _WinAPI_CreateCompatibleDC($hDC) $hBMP = _WinAPI_CreateCompatibleBitmap($hDC, $aTreeviewPos[2] - $scrollBarSize , ($aTreeviewPos[3] * ($iPages +1 ))) _WinAPI_SelectObject($hCDC, $hBMP) For $i = 0 to $iPages+1 _WinAPI_BitBlt($hCDC, 0, $aTreeviewPos[3] * $i, $aTreeviewPos[2] - $scrollBarSize , ($aTreeviewPos[3] ), $hDC,0, 0, $SRCCOPY) _WinAPI_PostMessage($Treeview,$WM_VSCROLL,$SB_PAGEDOWN,0) Sleep(250) Next _WinAPI_ReleaseDC($Treeview, $hDC) _WinAPI_DeleteDC($hCDC) _GDIPlus_Startup() $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBMP) _GDIPlus_ImageSaveToFile($hImage, $outputFile) _GDIPlus_Shutdown() _WinAPI_DeleteObject($hBMP) ; If FileExists($outputFile) Then ShellExecute($outputFile) Sleep( 1000 ) ProcessClose ( "mmc.exe" ) ; close the device manager. THIS MIGHT BE WEAK. ; MouseMove ( 1150, 650) ; TO START, SECURE, SHUTDOWN SHORTCUT Sleep( 1000 ) ;; END CAPTURE ;; BEGIN JOIN IMAGES #include <GDIPlus.au3> #include <WinAPISysWin.au3> ; FULLY QUALIFIED PATH NAME (FQPN) TO FIRST IMAGE, FQPN TO SECOND IMAGE, FQPN TO COMBINED IMAGE ; _BMPJoin(@tempDir & "\start-menu1.jpg", @tempDir & "\start-menu2.jpg", @homeDrive & "\Users\Default\Desktop\UPDATE\start-menu.jpg", "right") ; SIDE-BY-SIDE ; _BMPJoin(@tempDir & "\device-manager1.jpg", @tempDir & "\device-manager2.jpg", @homeDrive & "\Users\Default\Desktop\UPDATE\device-manager.jpg", "") ; STACKED _BMPJoin(@tempDir & "\start-menu1.jpg", @tempDir & "\start-menu2.jpg", @homeDrive & "\Users\Default\Desktop\UPDATE\start-menu.jpg", "") _BMPJoin(@tempDir & "\device-manager1.jpg", @tempDir & "\device-manager2.jpg", @homeDrive & "\Users\Default\Desktop\UPDATE\device-manager.jpg", "") ;; END JOIN IMAGES Exit ; END OF SCRIPT ;; BEGIN SCREENSHOT FUNCTION Func ScreenShot() ; Capture full screen _ScreenCapture_Capture($ZDIR & $ZNAME, $ZTOPX, $ZTOPY, $ZBOTTOMX, $ZBOTTOMY) EndFunc ;==>ScreenShot ; https://www.autoitscript.com/autoit3/docs/libfunctions/_ScreenCapture_Capture.htm ; $iLeft [optional] X coordinate of the upper left corner of the rectangle ; $iTop [optional] Y coordinate of the upper left corner of the rectangle ; $iRight [optional] X coordinate of the lower right corner of the rectangle. If this is -1, the current screen width will be used. ; $iBottom [optional] Y coordinate of the lower right corner of the rectangle. If this is -1, the current screen height will be used. ;; END SCREENSHOT FUNCTION ;; BEGIN JOIN IMAGES FUNCTION ; https://www.autoitscript.com/forum/topic/80896-join-two-bitmap-images/ Func _BMPJoin($sFile1, $sFile2, $sResult, $Position) Local $hSourceIMG1, $hSourceIMG2, $iWidth1, $width2, $iHeight1, $iHeight2, $hBitmap, $hImage, $hGraphics Local $iBwidth, $iBheight If Not FileExists(StringRegExpReplace($sResult, "(^.*)\\.*", "\1")) Then $sResult = @ScriptDir & "\result.bmp" _GDIPlus_Startup() $hSourceIMG1 = _GDIPlus_ImageLoadFromFile($sFile1) $hSourceIMG2 = _GDIPlus_ImageLoadFromFile($sFile2) $iWidth1 = _GDIPlus_ImageGetWidth($hSourceIMG1) $iHeight1 = _GDIPlus_ImageGetHeight($hSourceIMG1) $iWidth2 = _GDIPlus_ImageGetWidth($hSourceIMG2) $iHeight2 = _GDIPlus_ImageGetHeight($hSourceIMG2) If $Position = "right" Then $iBwidth = $iWidth1 + $iWidth2 $iBheight = $iHeight1 if $iHeight2 > $iHeight1 then $iBheight = $iHeight2 ; WORK NEEDS TO BE DONE TO ELIMINATE THE BLACK BAR WHEN THE SHOTS ARE NOT THE SIZE HEIGHT AND ARE BEING DISPLAYED SIDE-BY-SIDE. Else;position = "below" $iBwidth = $iWidth1 if $iWidth2 > $iWidth1 then $iBwidth = $iWidth2 $iBheight = $iHeight1 + $iHeight2 EndIf $hBitmap = _CreateBMP($iBwidth, $iBheight) $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap) $hGraphics = _GDIPlus_ImageGetGraphicsContext($hImage) ; https://www.autoitscript.com/autoit3/docs/libfunctions/_GDIPlus_GraphicsDrawImageRectRect.htm _GDIPlus_GraphicsDrawImageRectRect($hGraphics, $hSourceIMG1, 0, 0, $iWidth1, $iHeight1, 0, 0, $iWidth1, $iHeight1) If $Position = "right" Then _GDIPlus_GraphicsDrawImageRectRect($hGraphics, $hSourceIMG2, 0, 0, $iWidth2, $iHeight2, $iWidth1, 0, $iWidth2, $iHeight2) Else _GDIPlus_GraphicsDrawImageRectRect($hGraphics, $hSourceIMG2, 0, 0, $iWidth2, $iHeight2, 0, $iHeight1, $iWidth2, $iHeight2) EndIf _GDIPlus_ImageSaveToFile($hImage, $sResult) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteObject($hImage) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_ImageDispose($hSourceIMG1) _GDIPlus_ImageDispose($hSourceIMG2) _GDIPlus_Shutdown() EndFunc ;==>_BMPJoin Func _CreateBMP($sWidth, $sHeight) Local $hWnd, $hDC, $hBMP $hWnd = _WinAPI_GetDesktopWindow() $hDC = _WinAPI_GetDC($hWnd) $hBMP = _WinAPI_CreateCompatibleBitmap($hDC, $sWidth, $sHeight) _WinAPI_ReleaseDC($hWnd, $hDC) Return $hBMP EndFunc ;==>_CreateBMP ;; END JOIN IMAGES FUNCTION SCRIPT TWO:
      ;; AUTOIT3 v3.3.14.5 SCRIPT ;; PURPOSE: ; WRITE AN AUTOIT3 SCRIPT THAT WHEN RUN IN A WINDOWS SCHEDULED TASK WILL PRODUCE A SCREENSHOT OF THE WINDOWS 10 DESKTOP, START MENU, QUICK ACCESS MENU, AND DEVICE MANAGER WITHOUT INTERACTION. ;; SEE https://www.autoitscript.com/forum/topic/196256-screenshot-win10-desktop-quick-access-device-manager-start-menu-automated-shots-stacked-or-side-by-side-requires-admin/ ;; MUST BE RUN WITH ADMIN PRIVILEDGES. NOT ROBUST YET. ;; DOWNLOAD COORDINATES.AU3 https://www.autoitscript.com/forum/topic/196256-screenshot-win10-desktop-quick-access-device-manager-start-menu-automated-shots-stacked-or-side-by-side-requires-admin/ ;; SCREENSHOT WIN10 DESKTOP, QUICK ACCESS, DEVICE MANAGER AND START MENU. ;; MULTIPLE SHOTS JOINED STACKED, SIDE-BY-SIDE, OR NEITHER. SEE SIDE-BY-SIDE ;; WORK NEEDS TO BE DONE TO ELIMINATE THE BLACK BAR WHEN THE SHOTS ARE NOT THE SAME HEIGHT AND ARE BEING DISPLAYED SIDE-BY-SIDE. ;; MY GUESS THE EASIEST THING TO DO WOULD BE TO TURN IT WHITE. ;; YOU WILL HAVE TO TELL IT WHERE YOUR TASKBAR EXPLORER SHORTCUT IS. SEE MouseClick ( "right", 74, 748, 1, 0) ;; YOU WILL HAVE TO TELL IT WHERE TO PROCESS AND MOVE THE SHOTS. SEE MULTIPLE OF $ZDIR, $ZNAME, FQPN SEE $outputFile ;; IMPROVEMENTS ARE WELCOMED ;; FIND LIST OF ENVIRONMENT VARIABLES NAMES ;; AUTOIT3 HELP File ;; "C:\Program Files (x86)\AutoIt3\AutoIt.chm" ;; SEARCH FOR MACRO REFERENCE AND MACRO REFERENCE - DIRECTORY ;; THANKS TO RASIM, MARTIN, AND BOOMINGRANNY AT AUTOITSCRIPT.COM ; https://www.autoitscript.com/forum/topic/80896-join-two-bitmap-images/ ; https://www.autoitscript.com/forum/topic/80896-join-two-bitmap-images/?do=findComment&comment=581214 ; https://www.autoitscript.com/forum/topic/80896-join-two-bitmap-images/?do=findComment&comment=581372 ; https://www.autoitscript.com/forum/topic/196256-screenshot-win10-desktop-quick-access-device-manager-start-menu-automated-shots-stacked-or-side-by-side-requires-admin/ ; https://www.autoitscript.com/forum/topic/196256-screenshot-win10-desktop-quick-access-device-manager-start-menu-automated-shots-stacked-or-side-by-side-requires-admin//?do=findComment&comment=1407181 ;; "C:\Program Files (x86)\AutoIt3\AutoIt3_x64.exe" "F:\MYAPPS\WINDOWS\screenshots9.au3" ;; Screenshot Win10 desktop, quick access, device manager, start menu. Shots stacked or side-by-side. Admin privileges. Not robust. ; BEGIN CAPTURE ; https://www.autoitscript.com/forum/topic/8377-capture-screen-dll/ ; Capture full screen ; Fist parameter - filename, last - jpeg quality. #include <ScreenCapture.au3> send("#d") ; show desktop ;DEVICE MANAGER ;STARTING THE DEVICE MANAGER THIS WAY REQUIRED: ; 1. IT BE DONE AT THE BEGINNING OF THE SCRIPT. ; 2. MORE WORK TO FIND THE COORDINATES: ; https://www.autoitscript.com/forum/topic/165325-how-to-get-4-screen-coordinates-just-by-dragging-a-rectangle/?do=findComment&comment=1206830 ; modified and saved as "C:\Program Files (x86)\AutoIt3\Include\Coordinates.au3" ; download Coordinates.au3 https://www.autoitscript.com/forum/topic/196256-screenshot-win10-desktop-quick-access-device-manager-start-menu-automated-shots-stacked-or-side-by-side-requires-admin/ Run("control /name Microsoft.DeviceManager") WinWaitActive("Device Manager") $WinHndl = WinGetHandle("Device Manager") WinMove($WinHndl,"",-4,0,@DesktopWidth+10,@DesktopHeight) ; MAKE ADJUSTMENTS HERE IF NECESSARY Sleep( 1000 ) Send("{TAB}") Sleep( 125 ) send("{down 4}") Sleep( 125 ) send("{right}") Sleep( 125 ) send("{down2}") Sleep( 125 ) send("{right}") Sleep( 125 ) send("{down 5}") Sleep( 125 ) send("{right}") Sleep( 500 ) send("{down 5}") Sleep( 500 ) send("{right}") Sleep( 125 ) send("{down 14}") Sleep( 125 ) send("{right}") Sleep( 125 ) send("{down 7}") Sleep ( 120 ) $ZDIR=@tempDir ;where does the screenshot go $ZNAME="\device-manager1.jpg" ;what will its name be $ZTOPX=24 $ZTOPY=84 $ZBOTTOMX=277 $ZBOTTOMY=374 #include <Coordinates.au3>; finds incorrect coordinates. They are shifted down ~50px. Does not work on menus exposed by right clicking or the start menu ScreenShot () ; exit $ZDIR=@tempDir ;where does the screenshot go $ZNAME="\device-manager2.jpg" ;what will its name be $ZTOPX=24 $ZTOPY=374 $ZBOTTOMX=277 $ZBOTTOMY=716 #include <Coordinates.au3>; finds incorrect coordinates. They are shifted down ~50px. Does not work on menus exposed by right clicking or the start menu ScreenShot() Sleep( 500 ) ProcessClose ( "mmc.exe" ) ; close the device manager ; QUICK ACCESS ; https://www.autoitscript.com/autoit3/docs/functions/MouseClick.htm MouseClick ( "right", 74, 748, 1, 0) ; right click windows explorer shortcut on taskbar. Sleep( 1200 ) send("{up}") ; SCRIPT MORE RELIABLE IF UPs ARE NOT COMBINED Sleep( 120 ) send("{up}") Sleep( 120 ) send("{up}") Sleep( 120 ) send("{up}") Sleep( 120 ) send("{down}") Sleep (1200) $ZDIR=@homeDrive & "\Users\Default\Desktop\UPDATE" ;where does the screenshot go $ZNAME="\quick-access.jpg" ;what will its name be $ZTOPX=0 $ZTOPY=0 $ZBOTTOMX=251 $ZBOTTOMY=615 #include <Coordinates.au3>; finds incorrect coordinates. They are shifted down ~50px. Does not work on menus exposed by right clicking or the start menu ScreenShot() Sleep ( 250 ) ; START MENU send("{LWIN}") ;OPEN START MENU Sleep ( 250 ) $ZDIR=@tempDir ;where does the screenshot go $ZNAME="\start-menu1.jpg" ;what will its name be $ZTOPX=315 $ZTOPY=139 $ZBOTTOMX=1285 $ZBOTTOMY=660 #include <Coordinates.au3>; finds incorrect coordinates. They are shifted down ~50px. Does not work on menus exposed by right clicking or the start menu ScreenShot() ; BEGIN WEAK POINT send("{tab}"); COMBINING TABS BREAKS SCRIPT Sleep ( 240 ) send("{tab}") Sleep ( 240 ) send("{tab}") Sleep ( 500 ) send("{down 8}"); move to the bottom of the start menu to take the next screenshot. operates on the first column of shortcuts. will only go to the bottom of it. add send("{right}") after the last tab to operate on another column. Sleep ( 1000 ) ; END WEAK POINT ; $ZDIR=@tempDir ;where does the screenshot go $ZNAME="\start-menu2.jpg" ;what will its name be $ZTOPX=315 $ZTOPY=409 $ZBOTTOMX=1285 $ZBOTTOMY=730 #include <Coordinates.au3>; finds incorrect coordinates. They are shifted down ~50px. Does not work on menus exposed by right clicking or the start menu ScreenShot() Sleep ( 120 ) send("{LWIN}") ; CLOSE THE START MENU Sleep ( 120 ) ; DESKTOP $ZDIR=@homeDrive & "\Users\Default\Desktop\UPDATE" ;where does the screenshot go $ZNAME="\desktop.jpg" ;what will its name be $ZTOPX=0 $ZTOPY=0 $ZBOTTOMX=-1 $ZBOTTOMY=-1 ScreenShot() sleep (500) ;; END CAPTURE ;; BEGIN JOIN IMAGES #include <GDIPlus.au3> #include <WinAPISysWin.au3> ; FULLY QUALIFIED PATH NAME (FQPN) TO FIRST IMAGE, FQPN TO SECOND IMAGE, FQPN TO COMBINED IMAGE ; _BMPJoin(@tempDir & "\start-menu1.jpg", @tempDir & "\start-menu2.jpg", @homeDrive & "\Users\Default\Desktop\UPDATE\start-menu.jpg", "right") ; SIDE-BY-SIDE ; _BMPJoin(@tempDir & "\device-manager1.jpg", @tempDir & "\device-manager2.jpg", @homeDrive & "\Users\Default\Desktop\UPDATE\device-manager.jpg", "") ; STACKED _BMPJoin(@tempDir & "\start-menu1.jpg", @tempDir & "\start-menu2.jpg", @homeDrive & "\Users\Default\Desktop\UPDATE\start-menu.jpg", "") _BMPJoin(@tempDir & "\device-manager1.jpg", @tempDir & "\device-manager2.jpg", @homeDrive & "\Users\Default\Desktop\UPDATE\device-manager.jpg", "") ;; END JOIN IMAGES Exit ; END OF SCRIPT ;; BEGIN SCREENSHOT FUNCTION Func ScreenShot() ; Capture full screen _ScreenCapture_Capture($ZDIR & $ZNAME, $ZTOPX, $ZTOPY, $ZBOTTOMX, $ZBOTTOMY) EndFunc ;==>ScreenShot ; https://www.autoitscript.com/autoit3/docs/libfunctions/_ScreenCapture_Capture.htm ; $iLeft [optional] X coordinate of the upper left corner of the rectangle ; $iTop [optional] Y coordinate of the upper left corner of the rectangle ; $iRight [optional] X coordinate of the lower right corner of the rectangle. If this is -1, the current screen width will be used. ; $iBottom [optional] Y coordinate of the lower right corner of the rectangle. If this is -1, the current screen height will be used. ;; END SCREENSHOT FUNCTION ;; BEGIN JOIN IMAGES FUNCTION ; https://www.autoitscript.com/forum/topic/80896-join-two-bitmap-images/ Func _BMPJoin($sFile1, $sFile2, $sResult, $Position) Local $hSourceIMG1, $hSourceIMG2, $iWidth1, $width2, $iHeight1, $iHeight2, $hBitmap, $hImage, $hGraphics Local $iBwidth, $iBheight If Not FileExists(StringRegExpReplace($sResult, "(^.*)\\.*", "\1")) Then $sResult = @ScriptDir & "\result.bmp" _GDIPlus_Startup() $hSourceIMG1 = _GDIPlus_ImageLoadFromFile($sFile1) $hSourceIMG2 = _GDIPlus_ImageLoadFromFile($sFile2) $iWidth1 = _GDIPlus_ImageGetWidth($hSourceIMG1) $iHeight1 = _GDIPlus_ImageGetHeight($hSourceIMG1) $iWidth2 = _GDIPlus_ImageGetWidth($hSourceIMG2) $iHeight2 = _GDIPlus_ImageGetHeight($hSourceIMG2) If $Position = "right" Then $iBwidth = $iWidth1 + $iWidth2 $iBheight = $iHeight1 if $iHeight2 > $iHeight1 then $iBheight = $iHeight2 ; WORK NEEDS TO BE DONE TO ELIMINATE THE BLACK BAR WHEN THE SHOTS ARE NOT THE SIZE HEIGHT AND ARE BEING DISPLAYED SIDE-BY-SIDE. Else;position = "below" $iBwidth = $iWidth1 if $iWidth2 > $iWidth1 then $iBwidth = $iWidth2 $iBheight = $iHeight1 + $iHeight2 EndIf $hBitmap = _CreateBMP($iBwidth, $iBheight) $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap) $hGraphics = _GDIPlus_ImageGetGraphicsContext($hImage) ; https://www.autoitscript.com/autoit3/docs/libfunctions/_GDIPlus_GraphicsDrawImageRectRect.htm _GDIPlus_GraphicsDrawImageRectRect($hGraphics, $hSourceIMG1, 0, 0, $iWidth1, $iHeight1, 0, 0, $iWidth1, $iHeight1) If $Position = "right" Then _GDIPlus_GraphicsDrawImageRectRect($hGraphics, $hSourceIMG2, 0, 0, $iWidth2, $iHeight2, $iWidth1, 0, $iWidth2, $iHeight2) Else _GDIPlus_GraphicsDrawImageRectRect($hGraphics, $hSourceIMG2, 0, 0, $iWidth2, $iHeight2, 0, $iHeight1, $iWidth2, $iHeight2) EndIf _GDIPlus_ImageSaveToFile($hImage, $sResult) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteObject($hImage) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_ImageDispose($hSourceIMG1) _GDIPlus_ImageDispose($hSourceIMG2) _GDIPlus_Shutdown() EndFunc ;==>_BMPJoin Func _CreateBMP($sWidth, $sHeight) Local $hWnd, $hDC, $hBMP $hWnd = _WinAPI_GetDesktopWindow() $hDC = _WinAPI_GetDC($hWnd) $hBMP = _WinAPI_CreateCompatibleBitmap($hDC, $sWidth, $sHeight) _WinAPI_ReleaseDC($hWnd, $hDC) Return $hBMP EndFunc ;==>_CreateBMP ;; END JOIN IMAGES FUNCTION ;; BEGIN COORDINATES FUNCTION ;; END COORDINATES FUNCTION
      KEYWORDS: RIGHT CLICK EXPLORER SHORTCUT PINNED TO TASKBAR PINNED TO QUICK ACCESS PIN TO QUICK ACCESS PIN TO EXPLORER PINNED TO EXPLORER
       
       
    • stayready40
      By stayready40
      Hello all. I created a script to uninstall Symantec from our environment and I placed the "BlockInput(1)" command in the beginning of the script so that end users would not be able to move the mouse or keyboard to disrupt the mouse clicks.
      During testing we found that this worked for our Windows 7 machines, but for our windows 10 machines the mouse disable did not work can anyone shed some light on why this is? 
      Here is my code:

       
    • faustf
      By faustf
      hi guys
      i have a script  like this,  in windows 7 work perfect , in windows 10 not  work  , some one can explain me  why ??'
      #include <Array.au3> #include <MsgBoxConstants.au3> Global $aGPathFoto= FileReadToArray (@ScriptDir & "\TEMP\PathFoto.txt") Local $ctrl = 0 While 1 Local $hWnd = WinWait("[CLASS:#32770]", "", 10) If WinExists("[CLASS:#32770]") Then If $ctrl < 2 Then ControlSend($hWnd, "Choose File to Upload", "[CLASS:Edit; INSTANCE:1]", $aGPathFoto[0]&"{Enter}") Exit $ctrl += 1 Else ExitLoop EndIf EndIf WEnd $aGpathfoto = C:\Users\Public\Pictures\Sample Pictures\Chrysanthemum.jpg
×