Jump to content

_StringToPic


Achilles
 Share

Recommended Posts

Hey, I saw a website that converts text to string in order to protect your email address... So I tried it with AutoIt and this is what I got:

(I do realize that your font will affect how this works so you may need to adjust some of the values in the screen capture function)

#include<ScreenCapture.au3>

_StringToPic('Hey, my name is Achilles... What a surprise.', @ScriptDir & '\Heya.bmp')

Func _StringToPic($string, $outPutDir)
    $notepadName = 'Untitled - Notepad';Change if your computer isn't in English

    $pid = Run('notepad.exe');, '', @SW_HIDE)
    WinWait($notepadName)

    WinMove($notepadName, '', 0, 0) 
    
    $clip = ClipGet() 
    ClipPut($string)
    Send('{ENTER}^v{SPACE 4}')
    ClipPut($clip)
    
    $temp = _ScreenCapture_CaptureWnd($outPutDir, WinGetHandle($notepadName), 4, 55, StringLen($string) * 8.5, 77)
    ProcessClose($pid)
EndFunc
I bet there is a better way to do it, but that's one reason why I'm actually posting this.
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...