Do you use Pawn Studio?

For scripting examples for learning how to use AMXX.
User avatar
Archive-Poster
Posts: 1229
Gender:
United States of America

Do you use Pawn Studio?

Post by Archive-Poster »

First off im not sure if this is the best place to put this, but seeing as though it is a code snippet and it is to do with coding ill whack it here anyway

Because i get really annoyed with the 'Code Explorer' and 'Code Inspector' appearing every time i open pawn studio, i made this mini autoit script
AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys). AutoIt is also very small, self-contained and will run on all versions of Windows out-of-the-box with no annoying "runtimes" required!
Download Autoit here
Download AutoitDocs here
Download Pawn Studio here
<to be added>

How to do it:

1. Once youve installed autoit, right click on your desktop and chose "New > Autoit v3 Script"
2. Name the file whatever you want and hit return
3. Open the file and paste the code below into the text area
4. Change the first line of the script to the location of your "PawnStudio.exe"
5. Save the file and close the editor
6. Right click on the file and chose 'Compile Script'

What it does:

This will create an .exe (executable) file for you to run at your will
Note: You do not need the .au3 file anymore (unless you want to edit the source) so feel free to delete it

Now this .exe file will open pawn studio for you (maximized) and automatically close both the 'Code Explorer' and 'Code Inspector'.

The code:

Code: Select all

$loc = "Z:\Program Files\Pawn Studio\PawnStudio.exe"

If Not WinExists("Pawn Studio") Then
    If Not Run($loc, "", @SW_MAXIMIZE) Then
        MsgBox(0, "Error", "Cannot find PawnStudio.exe")
        Exit
    Else
        WinWaitActive("Pawn Studio")                ;Wait for the window to become active
        $x = MouseGetPos()                            ;Get the original mouse position
        BlockInput(1)                                ;Block mouse movements
        MouseClick("primary", 130, 30, 1, 0)        ;Move to "View" and click
        MouseClick("primary", 130, 220, 1, 0)        ;Untick "Explorer"
        MouseClick("primary", 130, 30, 1, 0)        ;Move to "View" and click
        MouseClick("primary", 130, 240, 1, 0)        ;Untick "Inspector"
        MouseMove($x[0], $x[1], 0)                    ;Move mouse back to where it started
        BlockInput(0)                                ;Allow mose movement again
        Exit                                        ;Close the script
    EndIf
Else
    MsgBox(0, "Error", "Pawn Studio is already running!")
    Exit
EndIf 
Notes:

- This has only been tested on Windows 7 but in theory should work for any windows OS
- If anybody wants any other scripts similar to this, feel free to ask i and ill give it a shot
- Autoit can be used for bhops scripts (for CS) etc. but i will not support this
User avatar
Archive-Poster
Posts: 1229
Gender:
United States of America

Re: Do you use Pawn Studio?

Post by Archive-Poster »

Pawn studio is buggy as hell.

Notepad++ FTW.
User avatar
Archive-Poster
Posts: 1229
Gender:
United States of America

Re: Do you use Pawn Studio?

Post by Archive-Poster »

im not a big fan of n++
i used it for a while but i could never get used to the new highlighting
if it was the same as ps, i might probably switch to it but for now im sticking with ps
Well, then just change it on the XML file.

EDIT: Here ya go, Notepad++ highlighting with Pawn Studio colors:
Attachments
userDefineLang.zip
(15.39 KiB) Downloaded 14 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest