How To Use Code To Set Font Size In A New NotePad Window (On Another Person's Computer)



  • Hiya all! I’m currently in the process of writing a program in notepad/VBS and it types out ‘You Are A Moron’ in full caps on a new notepad window. The idea is to send it via email to somebody else’s computer, and they open it up, and it types it out on screen, but I want it to set the font to a bigger size before it starts typing stuff out. I’ve highlighted in bold the problem code, but this is what I’ve got so far:

    WScript.Sleep 1000
    Set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.Run "notepad"
    WScript.Sleep 100
    WshShell.AppActivate "Notepad"
    **Set FontSize = "72"**
    WScript.Sleep 250
    WshShell.SendKeys "Y"
    WScript.Sleep 250
    WshShell.SendKeys "O"
    WScript.Sleep 250
    WshShell.SendKeys "U "
    WScript.Sleep 250
    WshShell.SendKeys "A"
    WScript.Sleep 250
    WshShell.SendKeys "R" 
    WScript.Sleep 250
    WshShell.SendKeys "E "
    WScript.Sleep 250
    WshShell.SendKeys "A "
    WScript.Sleep 250
    WshShell.SendKeys "M"
    WScript.Sleep 250
    WshShell.SendKeys "O"
    WScript.Sleep 250
    WshShell.SendKeys "R"
    WScript.Sleep 250
    WshShell.SendKeys "O"
    WScript.Sleep 250
    WshShell.SendKeys "N "
    WScript.Sleep 250
    
    


  • There are so many things wrong with this…

    1. This is a forum about Notepad++, which is not the same thing as Windows notepad.exe. Your script is referencing the Microsoft product, not the open-source Notepad++ project that this forum is dedicated to.
    2. You seem to be asking how to code something. This is not a coding forum.
    3. You seem to be asking how to make a email attachment that automatically runs on someone else’s computer without their desire to have it run, and to have it do malicious or at least rude things.

    DON’T DO THIS

    This is tantamount to creating malware / virus / trojan / worm / etc.

    No, we are not going to help you “improve” this script to make malicious software.


Log in to reply