Jump to content
Sign in to follow this  
AliOzturk

Script for creating logs

Recommended Posts

AliOzturk

Hello Auto IT

I wanna keep it short, so let's get started.

I like to store my account details for various sites and programs on a simple log file, It's personal preference and I know it's risky. I'm using somewhat a "form" when I'm typing in my accounts, so that It's easier for me to keep track on what site/program the account is for.

The form looks somewhat like this:

 

### Game / Site: <Here goes the link/name>

### Username: <Username>

### Password: <Password (Often written so only i know what it means>

### More info: <Like what realm or something like that>

 

Would it be possible to create a script in which makes a UI where i can type in those fields, and it will automaticly add it to my log file?

I would love to know how this could work, and what kind commands i should look into.

- AliOzturk

Share this post


Link to post
Share on other sites
water

To safely store your passwords AND automate login I would have a look at the open source tool KeePass and the >KeeForm tool from this site.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
UEZ

AliÖztürk,

try something like this here:

#include <EditConstants.au3>
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiButton.au3>

$sLog = @ScriptDir & "\MyLog.txt"
$hFile = FileOpen($sLog, 1)
$hGUI = GUICreate("Test", 350, 350, -1, -1, -1, -1)
GUICtrlCreateLabel("Password:", 32, 160, 63, 23, $SS_RIGHTJUST, -1)
GUICtrlSetFont(-1, 13, 400, 0, "Arial Narrow")
GUICtrlSetBkColor(-1, "-2")
GUICtrlCreateLabel("More Info:", 32, 190, 68, 23, $SS_RIGHTJUST, -1)
GUICtrlSetFont(-1, 13, 400, 0, "Arial Narrow")
GUICtrlSetBkColor(-1, "-2")
GUICtrlCreateLabel("Username:", 32, 130, 82, 23, $SS_RIGHTJUST, -1)
GUICtrlSetFont(-1, 13, 400, 0, "Arial Narrow")
GUICtrlSetBkColor(-1, "-2")
$iBtnSave = GUICtrlCreateButton("Save", 222, 300, 100, 30, -1, -1)
GUICtrlCreateLabel("Game / Site:", 28, 102, 88, 23, $SS_RIGHTJUST, -1)
GUICtrlSetFont(-1, 13, 400, 0, "Arial Narrow")
GUICtrlSetBkColor(-1, "-2")
$iInp1 = GUICtrlCreateInput("<Like what realm or something like that>", 122, 190, 200, 71, BitOR($ES_MULTILINE, $WS_VSCROLL), $WS_EX_CLIENTEDGE)
$iInp2 = GUICtrlCreateInput("<Password>", 122, 160, 200, 20, -1, $WS_EX_CLIENTEDGE)
$iInp3 = GUICtrlCreateInput("<Here goes the link/name>", 122, 102, 200, 20, -1, $WS_EX_CLIENTEDGE)
$iInp4 = GUICtrlCreateInput("<Username>", 122, 130, 200, 20, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("Create Log", 11, 20, 327, 49, BitOR($SS_CENTER, $SS_CENTERIMAGE) , -1)
GUICtrlSetFont(-1, 32, 400, 0, "Arial Narrow")
GUICtrlSetColor(-1, "0x0000FF")
GUICtrlSetBkColor(-1, "-2")
GUISetState(@SW_SHOW, $hGUI)


While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            FileClose($hFile)
            GUIDelete()
            Exit
        Case $iBtnSave
            FileWrite($hFile,   GUICtrlRead($iInp1) & @CRLF & _
                                GUICtrlRead($iInp2) & @CRLF & _
                                GUICtrlRead($iInp3) & @CRLF & _
                                GUICtrlRead($iInp4) & @CRLF & @CRLF)
            MsgBox(0, "Info", "Added text to logfile", 30)
    EndSwitch
WEnd

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

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  

  • Similar Content

    • DynamicRookie
      By DynamicRookie
      Hey There!
       
      So, what i need to do is an app that can read text in a image (I.e. a png that has text saying "This is a png" and return the text to a variable)
      I'm pretty much a newbie on AutoIt, my purpose is doing that but i don't know any function that can

      Any help is much appreciated
    • santoshM
      By santoshM
      How can i exit from a procedure in auto
      Func test() if x=o then     return endif endFunc  
    • Valnurat
      By Valnurat
      Hi
      Small question.
      I trying to find all index in an array with value higher than 7.
      How can that be possible?
    • TrashBoat
      By TrashBoat
      Could someone help me create or give an idea of how to do a incrementing for loop that would do this: https://i.imgur.com/YFUt47H.gifv
      I'm having a hard time figuring it out :S
    • msd1994
      By msd1994
      I have a script that just adds some keyboard shortcuts for things like displaying the current song and artist, moving the window to the side so it won't pop up in my way, and play/pause, next song, previous song (these are the only 3 to still work since they don't need the window handle.)
      In some update recently, Spotify's window class swapped from "[CLASS:SpotifyMainWindow]" to "[CLASS:Chrome_WidgetWin_0]". Using the new class in my controls doesn't seem to work, I've tried getting the window handle from the process handle (_GetHwndFromPID($PID)) but that seems to fail as well.
      Does anybody have some idea of a way I could get this script working again?
       
      edit: seems like discord has the same window class name, so could be some issue with this? Still not sure of a way to solve the issue though, I added a function to get the handle of the active window and can just use that now, but it was able to find it on its own before on spotify startup or script startup which would be preferred.
       
      Thanks!
×

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.