Jump to content

Recommended Posts

Xandy

Screenshot program that can upload/FTP to website/storage with hotkey.

Features GUI to display programmable keys.

dialog.gif

Set the hotkeys with this function to use, and display hotkeys.

; hotkey_set() Parameters:
; -----------------------------------------------------------
; $aHotkey -                The array hotkeys are stored in.  This function sets the values of this array[hotkey_id][$hotkey_data]
; $dHotkey_id -             The enum for this hotkey index
; $sHotkey_description -     The label displayed to the user to represent function of hotkey
; $sHotkey_name -            The hotkey it'self.  Whatever name string you want to give the key
; $dHotkey_key -             The _IsPressed keycode
;    Keycodes AT: https://www.autoitscript.com/autoit3/docs/libfunctions/_IsPressed.htm
; $dHotkey_shift -             Shift flag 0 or 1 Default off
; $dHotkey_ctrl -             Ctrl flag 0 or 1 Default off
; $dHotkey_alt -             Alt flag 0 or 1 Default off
Func hotkey_set(ByRef $aHotkey, $dHotkey_id, $sHotkey_description, $sHotkey_name, $dHotkey_key, $dHotkey_shift = 0, $dHotkey_ctrl = 0, $dHotkey_alt = 0)
    $aHotkey[$dHotkey_id][$eHotkey_data_key_description] = $sHotkey_description
    $aHotkey[$dHotkey_id][$eHotkey_data_key_name] = $sHotkey_name
    $aHotkey[$dHotkey_id][$eHotkey_data_key] = $dHotkey_key
    $aHotkey[$dHotkey_id][$eHotkey_data_shift] = $dHotkey_shift
    $aHotkey[$dHotkey_id][$eHotkey_data_ctrl] = $dHotkey_ctrl
    $aHotkey[$dHotkey_id][$eHotkey_data_alt] = $dHotkey_alt
EndFunc   ;==>hotkey_set



; You can set your hotkeys here
; Please visit the hotkey_set() function for parameter information
hotkey_set($aHotkey, $eHotkey_screenshot_ftp, "Selected Window to FTP", "F12", "7B", 0, 1, 0); F12
hotkey_set($aHotkey, $eHotkey_screenshot_disk, "Selected Window to Disk", "S", "53", 1, 1, 1); S
hotkey_set($aHotkey, $eHotkey_clipboard_send, "Send Clipboard keystrokes", "F10", "79", 1, 1, 1); F10

 

Configure settings dialog:

settings_dialog.png

Screenshot Filename and Screenshot Counter, are used to create simple unique filenames that can cycle.

Copy URL to clipboard option. - For linking your screenshots.

The screenshot file type is for local copy only.

App always uses .JPG for FTP right now, but I could add FTP screenshot file type specification.

 

Any suggestions?  Did I break anything, what did I miss?

Package uses TTS.au3 by Beege: 

 

FTP_Screen.zip

File includes:

   - FTP_Screen.au3

   - FTPScreen.ico

   - TTS.au3 - by Beege

Edited by Xandy

Share this post


Link to post
Share on other sites
Xandy

I've only used this app with my website and FTP'd to there.

Someone please let me know if FTP_Screen works with things like Dropbox or other free storage sites.

I'd love to hear your stories about how you used FTP_Screen.

Edited by Xandy

Share this post


Link to post
Share on other sites
SmOke_N

It'd be pretty obvious via the code if it worked with your wishlist...  And from what I've read.. no.. it does exactly what it says it does

  • Like 1

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Xandy

Added: Open screenshots folder to Tools menu
Added: Option to disable voice narration

Fixed:
Changed _exit_hotkey function to flag $gQuit instead of Exit to protect user data changes
Termination should now always pass through the main() hitting the save() and recording $screenshot_counter so screenshots are not overwritten
I also save to disk in the setting dialog to ensure data is preserved, enter that data once and be done with it
Removed: $gClipboard_url_disable - it's in the settings array
Changed $ghGui to $hGui to reflect it's non-global state

Have you been thinking about downloading FTP_Screen and just weren't sure if it was the right time?
In the history of FTP_Screen there has never been a better time to download!

 

FTP_Screen homepage

Edited by Xandy

Share this post


Link to post
Share on other sites
TheDcoder

FTP_Screen is like a very stripped down version of ShareX created by @Jex :)

  • Like 1

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

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

    • Skeletor
      By Skeletor
      MS Splash Screens
      The office 2016/17 office suite has made many people turn heads with its functions and especially their splash screen.
      I now present to you, the MS Style Splash Screen. For Rookies, Novices and anyone who wants a ready made splash screen for your gui application.

      You can now download it and also try it out yourself.
      You have three colors to choose from:
      Blue
      Red
      Green
      All three colours are from the famous programs.
      I also included the KODA form to you can have freedom with this splash screen.
      Note: the KODA form does not have the three colours as well as the correct blue. 

      Have fun and enjoy.
      Note:
      Thanks to kaz for updating the side scrolling dots.
       
       
    • CharlieH
      By CharlieH
      Hi,
       
      I have written a small script to read a file from an FTP server and check its contents. This can be re-run by the press of a button, however, if the file is deleted from the ftp server between runs (with the .exe still live), the file is still "read" and written locally, which then passes the check.
       
      If I run it initially without the file, it correctly fails and pops up my error message, but if the file is then added, it then seemingly gets cached (or similar) so that the app then always reports a success.
       
      The below code snippet is just the function run when the "test" button is pressed. It includes a load of debug message boxes, and from that I think I've gathered a few (possibly) interesting/relevant things:
      $Open and $Conn are 8 byte values, which increments (not by 1) when the FTP connection is not closed, but if the connection is closed, they stick at the value (presumably windows can re-use that session id if it's been closed e.g:
      1st run (file not present) $Open -> 0x00CC0004 $Conn -> 0x00CC0008
      2nd run (file not present) $Open -> 0x00CC0010 $Conn -> 0x00CC0014
      3rd run (file now present) $Open -> 0x00CC001C $Conn -> 0x00CC0020
      4th run (file still present) $Open -> 0x00CC001C $Conn -> 0x00CC0020
      $Ftp = _FTP_FileGet.... returns a 1 when file not present (in a run after it was present) and "test_transfer.txt" does get created and does contain the correct string This is the key bit I dont understand, I dont know how/where it is getting the data to write this file when it literally no longer exists on the target FTP server...
      resetting every variable used in the function each time it's run does work (in that they become 0), but it doesn't affect the putcome I had thought perhaps some key values were being stored in the variables, but this doesn't seem to be the case
       
       
      Is there any concept of clearing a cache when closing an ftp session? Or deleting any unknown temporary files windows might make?
       
      Thanks all
       
      Func Transfer() Local $connected = 0 $Ftpp = 0 ;Trying to reset these every time function is called $file = 0 $Open = 0 $Conn = 0 $Ftpc = 0 ;Make a new "connecting..." window so that the user has feedback that a transfer is attempting to take place ;Otherwise it just runs in the background and there's no indication its doing anything $connection_window = GUICreate ("Ethernet Switch Test" , 300 , 160 , -1 , -1 , -1 , -1 , 0) GUISetBkColor(0xFFFFFF) GUISetFont(10 * _GDIPlus_GraphicsGetDPIRatio()[0], 400, Default, "Sans Serif") $connecting_label = GUICtrlCreateLabel("Connecting to board...", 0, 25, 300, -1, $SS_Center, "") GUISetState(@SW_SHOW, $connection_window) Sleep(100) ;Connect ;MsgBox(0, "DEBUG", "1" & $Conn) While $connected = 0 $Open = _FTP_Open($count) ;MsgBox(0, "DEBUG", "open " & $Open) $Conn = _FTP_Connect($Open, $server, $username, $password) ;MsgBox(0, "DEBUG", "2" & $Conn) If $Conn = 0 then Local $retry = Msgbox(65, 'FTP Transfer', 'Connection failed' & @CRLF & "Retry?") If $retry = 2 Then MsgBox(0, "FTP Transfer", "Operation aborted") GUISetState(@SW_HIDE, $connection_window) Return EndIf Else $connected_label = GUICtrlCreateLabel("Connected!", 0, 45, 300, -1, $SS_Center, "") $connected = 1 MsgBox(0, "DEBUG", "3" & $connected) Sleep(100) endIf WEnd $transfering_label = GUICtrlCreateLabel("Reading file....", 0, 45, 300, -1, $SS_Center, "") ;Read file from server ;MsgBox(0, "DEBUG", "5" & $Ftpp) ;MsgBox(0, "DEBUG", "flie " & $file) $Ftpp = _FTP_FileGet($Conn, 'test/test.txt', 'test_transfer.txt') ;MsgBox(0, "DEBUG", "6" & $Ftpp) If ($Ftpp) then $transfered_label = GUICtrlCreateLabel("Transfered, checking...", 0, 65, 300, -1, $SS_Center, "") ;MsgBox(0, "DEBUG", "flie " & $file) $file = FileRead("test_transfer.txt") ;MsgBox(0, "DEBUG", "flie " & $file) If Not StringInStr($file, 'this is a test string 12345') Then MsgBox(0, "File check", "Received file incorrect, test failed!") GUISetState(@SW_HIDE, $connection_window) Return Else $tested_label = GUICtrlCreateLabel("Tested and Passed!", 0, 85, 300, -1, $SS_Center, "") $Ftpc = _FTP_Close($Open) ;MsgBox(0, "DEBUG", "close" & $Ftpc) ;$count = $count+1 $ok_button = GUICtrlCreateButton("OK", 125, 105, 50, -1) While 1 Local $pressed = GUIGetMsg() If ($pressed = $ok_button) Then FileDelete("test_transfer.txt") GUISetState(@SW_HIDE, $connection_window) ;$connection_window = 0 Return EndIf WEnd EndIf Else MsgBox(0, "Transfer", "Could not read file " & @error) GUISetState(@SW_HIDE, $connection_window) Return EndIf EndFunc  
    • guner7
      By guner7
      Hi everyone,
      I would like to share a simple snippet where I use for my hotkey script.
      I was searching for a solution whereby pressing a same key, I could have different outcome according to the way the key is being pressed.
      1) Double tap/press fast (like double click the mouse) - outcome A
      2) Long press or HOLD for awhile (2-4 sec) - outcome B
      #Include <Timers.au3> Global $interval_timer, $counter HotKeySet("{F10}", "_terminate") While 1 Sleep(10) WEnd Func _terminate() Local $itv_timer $itv_timer = _Timer_Diff($interval_timer) $interval_timer = _Timer_Init() ;ConsoleWrite($itv_timer & @CRLF) ;to review the timer difference so I can decide the range to capture double tap sequence If $itv_timer > 100 And $itv_timer < 250 Then $counter = 0 $interval_timer = _Timer_Init() MsgBox("","","double tap detected") Elseif $counter >= 25 Then $counter = 0 $interval_timer = _Timer_Init() MsgBox("","","long press detected") ElseIf $itv_timer < 50 Then $counter = $counter + 1 ConsoleWrite($counter & @CRLF) Else $counter = 0 EndIf EndFunc The trick here is to collect and use the frequency of the hotkey is called, and the time difference between each time the hotkey is being called.
      My coding style is not efficient and can be such a mess most of the time, any suggestion or better coding are welcome.
      I hope you find this one helpful.
    • Errious
      By Errious
      Hello,
      i am searching for a function that allows me some very specific functions for Screen Captures.
       
      First should be the possibillity to create a Screenshot from a specific window and this is possibly under another window but has to stay there and not getting forced to be in the first - layer position if this is clear enough :-) The other thing should be the ability to create a Screen Capture every couple minutes or a specific period.  
      I tried a lot of Screen Capture tools but neither can do both together.
      Also my try to create my own script with AutoIT failed, because of missing knoweledge about how to use it for this specific reasons, would be very kind if someone can tell me in the first place if this is possible at all and maybe someone has allready an idea about how to realize it?
       
      best regards
       
       
       
       
    • Sigmac
      By Sigmac
      I have used this code for a long time, but for a week or 2 it stopped working?
      Connection is ok, the put create the file on server if I delete it on the FTP server, but the file is empty and after 30 secondees the function return 0
      I have tested on 2 machines, Filezilla FTP client have no issue to the server.
      Firewall is disabled under test.
        If $writeFTP = True Then
            $Open=_FTPOpen('MyFTP Control')
            $Conn=_FTPConnect($Open, $destinationServer, $destinationUsername, $destinationPass)
       MsgBox(0,"start","start")
            $Ftpp=_FtpPutFile($Conn, $filePath&$name&".json", "httpdocs/p_calender/" & $name & ".json")
      MsgBox(0,"return","return"&$Ftpp)
      Exit
            $Ftpc=_FTPClose($Open)
           EndIf
       
      From the Lib:
      Func _FTPPutFile($l_FTPSession, $s_LocalFile, $s_RemoteFile, $l_Flags = 0, $l_Context = 0)
          Local $ai_FTPPutFile = DllCall('wininet.dll', 'int', 'FtpPutFile', 'long', $l_FTPSession, 'str', $s_LocalFile, 'str', $s_RemoteFile, 'long', $l_Flags, 'long', $l_Context)
          If @error OR $ai_FTPPutFile[0] = 0 Then
              SetError(-1)
              Return 0
          EndIf
          Return $ai_FTPPutFile[0]
      EndFunc ;==> _FTPPutFile()
       
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.