Jump to content
Sign in to follow this  

DropBoxControl.au3 - Pause/Resume Syncing!

Recommended Posts

Hello everyone!

I present to you a way to automate DropBox, at least syncing...


Posted Image




Ctrl + Q to exit.

Ctrl + Pause to Pause/Resume DropBox!

It can also use the following:

#AutoIt3Wrapper_Run_Before="%scitedir%DropBoxControl.exe" /Pause
#AutoIt3Wrapper_Run_After="%scitedir%DropBoxControl.exe" /Resume
Just copy the executable into the folder of the editor!

I hope you enjoy!


João Carlos.

Edited by JScript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram


dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Share this post

Link to post
Share on other sites

The program is working normal here...

Do the following:

1 - Let the DropBox syncing normally;

2 - Run the DropBoxControl;

3 - Use the keys to pause

4 - Copy or create a new file;

5 - Now use the keys to resume;

6 - You will notice that Dropbox adds new file in the clouds!

I did several other tests and they all worked!

Edit: I looked at the event (https://www.dropbox.com/events) and I could prove it's working!


Edited by JScript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram


dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Share this post

Link to post
Share on other sites

I'm not in a position to test right now, but it could be down to the locale perhaps? This is just 'a throwing it out there' guess.

UDF List:

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Share this post

Link to post
Share on other sites

Share this post

Link to post
Share on other sites


If I create a cmd file using the /pause and /resume switches, I can pause or resume Dropbox by running the cmd file, but if I then try to schedule these cmd files with Task Scheduler although the Scheduler reports that the task completed. Dropbox is not paused or resumed.

The same behaviour occurs if I start DropBoxControl.exe with either switch.

OS is Windows 7

Any ideas?

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By VeeDub
      I'm trying to write a script to allow pause / resume of Dropbox syncing; so that Dropbox syncing can be scheduled.
      So the idea is that the script will emulate what a user would normally do by clicking on Dropbox on the System Tray and then the script will toggle the sync operation
      If Dropbox currently syncing, will pause If syncing currently paused, will resume I'm writing this script for Windows 10
      I am able to open Dropbox from the System Tray, but I can't figure out how to enumerate the controls. 
      I would have been happy with the "simple" approach of using the Autoit Window Info tool to manually identify the values for the control. But unfortunately as soon as I click on the Finder Tool the Dropbox window closes.
      I then tried enumerating the controls with my script.
      I have experimented with a couple of scripts that others have shared, which while they don't error; don't return any values for the Controls.
      So at the moment I'm stuck and I'm after some ideas
      Is there a way to use a Windows Viewer tool with an app like Dropbox that doesn't remain visible?  (I had a quick look but could not find a solution) If I need to enumerate the controls myself, here is my current script. I'm using _EnumChildWindows from here #include <Array.au3> #include <GuiToolBar.au3> #include <_EnumChildWindows.au3> Local $hSysTray_Handle Local $hWnd="",$hControl=0,$sTitle=0,$sClass=0,$aEnumList Local $hNumber1Button=-1,$hNumber4Button=-1,$hPlusButton=-1,$hEqualButton=-1 $sSearchtext='Dropbox' $iButton=Get_SysTray_IconText($sSearchtext) _GUICtrlToolbar_ClickButton($hSysTray_Handle, $iButton, "left", False, 1) ; MsgBox (64,'Searched Button','Button: '&$iButton&@CRLF&'Instance: '&@extended) If WinActivate($hSysTray_Handle, "") Then ; MsgBox($MB_SYSTEMMODAL, "", "Dropbox Window activated") ; Check Dropbox status - Either: ; 'Up to date' (i.e. syncing) ; 'Syncing paused' (paused) $hWnd = $hSysTray_Handle ; Important to wait for the window to fully 'create' itself before getting child windows! ; Note that other processes that become activated somewhere between WinWait and this will cause WinWaitActive() to wait for manual activation ;WinWaitActive($hWnd) ; bad idea in busy environment Sleep(3000) WinActivate($hWnd) ; this seems to be a better alternative, the window seems fully created after this is called in my tests ; Parameters to function ;$hControl=HWnd(0x########) ;$sTitle="^(\d|\+|=)$" ; PCRE - gets controls with numbers, + or = sign only (problem: no instance #'s!) ;$sClass="Button" $aEnumList=_EnumChildWindows($hWnd,$hControl,$sTitle,$sClass) ;,2) for RegExp Title If @Error Then Exit ; Find specific items [Certain versions of Calc won't return any text] For $i=1 to $aEnumList[0][0] Switch $aEnumList[$i][4] Case "1" $hNumber1Button=$aEnumList[$i][0] ConsoleWrite("'1' Advanced Mode Name (in current state): [CLASS:Button; INSTANCE:"&$aEnumList[$i][3]&"]"&@CRLF) Case "4" $hNumber4Button=$aEnumList[$i][0] ConsoleWrite("'4' Advanced Mode Name (in current state): [CLASS:Button; INSTANCE:"&$aEnumList[$i][3]&"]"&@CRLF) Case "+" $hPlusButton=$aEnumList[$i][0] ConsoleWrite("'+' Advanced Mode Name (in current state): [CLASS:Button; INSTANCE:"&$aEnumList[$i][3]&"]"&@CRLF) Case "=" $hEqualButton=$aEnumList[$i][0] ConsoleWrite("'=' Advanced Mode Name (in current state): [CLASS:Button; INSTANCE:"&$aEnumList[$i][3]&"]"&@CRLF) EndSwitch Next ; Add Headers $aEnumList[0][0]="Handle" $aEnumList[0][1]="Classname" $aEnumList[0][2]="Control ID" $aEnumList[0][3]="Iteration" $aEnumList[0][4]="Title/Text" ; Bring the window forward WinActivate($hWnd) ; Perform a simple calculation to show interaction If $hNumber1Button<>-1 Then ControlClick($hWnd,"",$hNumber1Button,"primary",3) ControlClick($hWnd,"",$hNumber4Button) Sleep(1000) ControlClick($hWnd,"",$hPlusButton) Sleep(1000) ControlClick($hWnd,"",$hNumber4Button,"primary",2) ; double click, but that's fine Sleep(1000) ControlClick($hWnd,"",$hEqualButton) EndIf ; And Display ALL Enumerated Windows _ArrayDisplay($aEnumList,"Enumerated controls for App") Else MsgBox($MB_SYSTEMMODAL + $MB_ICONERROR, "Error", "Dropbox Window not activated") EndIf Func Get_SysTray_IconText($sSearch) For $i = 1 To 99 ; Find systray handles $hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:' & $i & ']') ; ConsoleWrite ("Handle: " & $hSysTray_Handle & @CRLF) If @error Then ;MsgBox(16, "Error", "System tray not found") ExitLoop EndIf ; Get systray item count Local $iSysTray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray_Handle) ConsoleWrite("iSysTray_ButCount: " & $iSysTray_ButCount & @CRLF ) If $iSysTray_ButCount = 0 Then ;MsgBox(16, "Error", "No items found in system tray") ContinueLoop EndIf Local $aSysTray_ButtonText[$iSysTray_ButCount] ; Look for wanted tooltip For $iSysTray_ButtonNumber = 0 To $iSysTray_ButCount - 1 ConsoleWrite("iSysTray_ButtonNumber: " & $iSysTray_ButtonNumber & " Button_Text: " & _GUICtrlToolbar_GetButtonText($hSysTray_Handle, $iSysTray_ButtonNumber) & @CRLF ) If $sSearch= StringLeft(_GUICtrlToolbar_GetButtonText($hSysTray_Handle, $iSysTray_ButtonNumber),StringLen($sSearch)) Then ConsoleWrite("Button Text: " & $sSearch & " Handle: " & $hSysTray_Handle & " Button Number: " & $iSysTray_ButtonNumber & @CRLF) Return SetError(0, $i, $iSysTray_ButtonNumber) EndIf Next Next Return SetError(1, -1, -1) EndFunc ;==>Get_SysTray_IconText Thanks,
    • By nacerbaaziz
      hello sirs, please i created a tool witch get the focused control in a window and play a audio file linked with this controls
      e.g buttons, checkBoxes, radios, comboboxes, and others
      i know that their is a function that give us the control focus but it return the classNN
      i want to get the class name to use it with a switch and
      because their are more than class e.g button tbutton timagebutton tnewButton...
      please can any one help me to get the class name not the classnn
      thanks in advance
    • By rudi
      the following script is running quite nicely for a friend of mine doing a year of work and travel to have a backup at home for all the pics and movies taken with her mobile phone,
      The facts:
      At home: a VMWARE virtual machine with dropbox installed for her DB account
      On-the-Road: One mobile phone, Camera Uploads are activated for her dropbox account, one Laptop.
      The idea is to have a copy of *ALL* pictures and movies taken with the mobile phone *OUTSIDE* the dropbox folder, so that the DB Max Size is never exceeded.
      The script is running at home and doing this:
      Copy all content from the "Camera Upload Folder" within the dropbox folder to some folder *OUTSIDE* the DB folder Move all content from the "Camera Upload Folder" do some other folder *INSIDE* the DB folder to indicate, that the backup copies at home were done successfully  
      Dropbox is also installed on the Laptop she has with her. So on the Laptop she checks from time to time the destination folder inside the dropbox folder and moves the pics / movies on the laptop to some other folder outside the dropbox as well. By that final step the images are moved out of the dropbox on the mobile phone as well, so that there is always space left to sync more pics / movies.
      As moving pics / movies out of the dropbox folder on the laptop doesn't touch the copies in the mobile phone's "Gallery", she has all the pics / movies at all three locations:
      Mobile Phone Laptop VM at home  
      The folder names propably are different for non-German localized Windows and Dropbox, just modify them to meet your localization.
    • By nacerbaaziz
      Hello my friends
      Can we create a single context menu on more than one item?
      For example, a context menu includes standardized options on more than one control, such as buttons or check boxes
      to Create a context menu on one item am using this function
      GUICtrlCreateContextMenu ($ HWND)
      How to link it with more than one element please?
      or if we can't do that, please give me a solution
      so i tried to add an context menus to all the controls but the script will be long, for that if their are any solutions i hope to give it to me
      thanks in advanced
    • By TheAutomator
      Is there a (simple) way to make your script using a picture-control to resize the gui?
      This would be useful for a transparant pop-up window with a custom made theme using picture controls:
      $Form = GUICreate('', 301, 173, 5, 5, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST)) GUICtrlCreatePic(@scriptdir & "\resize_win.bmp", 0, 73, 20, 51) ; some api call or code telling the os to use this picture as a resize border GUICtrlSetResizing(-1, $GUI_DOCKLEFT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) GUISetState(@SW_SHOW) While True if GUIGetMsg() = $GUI_EVENT_CLOSE then Exit WEnd  
      EDIT: to make it more clear what i wanna do, if you go with the mouse arrow over the border of a re-sizable window the arrow changes to a "resize" arrow, you click and drag the border and then the window size adjusts to the mouse position until you release the mouse button.
      I want my picture control to be used the same way as the resize border to resize my window.
  • Create New...