AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Code Snippets/Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=83)
-   -   Do you use Pawn Studio? (https://forums.alliedmods.net/showthread.php?t=122214)

minimiller 03-24-2010 10:45

Do you use Pawn Studio?
 
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
Quote:

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

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:
PHP Code:

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

If Not WinExists("Pawn Studio"Then
    
If Not Run($loc"", @SW_MAXIMIZEThen
        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"1303010)        ;Move to "View" and click
        MouseClick
("primary"13022010)        ;Untick "Explorer"
        
MouseClick("primary"1303010)        ;Move to "View" and click
        MouseClick
("primary"13024010)        ;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

Credits:

-Kreation: Due to crazy and annoying control panel settings, left click wouldnt work properly

Hf <3

Arkshine 03-24-2010 12:13

Re: Do you use Pawn Studio?
 
Pawn studio is buggy as hell.

AntiBots 03-24-2010 12:26

Re: Do you use Pawn Studio?
 
I am creating my Own IDE. :P

If I finish I will release it.

Kreation 03-24-2010 15:56

Re: Do you use Pawn Studio?
 
Quote:

Originally Posted by minimiller (Post 1127410)
ill whack it here anyway

LOL

And good job. I was meaning to ask you about this.

fysiks 03-24-2010 17:58

Re: Do you use Pawn Studio?
 
Notepad++ FTW.

ehha 03-24-2010 19:16

Re: Do you use Pawn Studio?
 
Personally I hate pawn studio, if there was no n++ I'd use amxx studio.

Quote:

Originally Posted by fysiks (Post 1127801)
Notepad++ FTW.

Thanks to you! :up:

minimiller 03-24-2010 19:20

Re: Do you use Pawn Studio?
 
i love the syntax highlighting of ps
n++ looks too weird to me :?

Bugsy 03-25-2010 08:40

Re: Do you use Pawn Studio?
 
AMX Mod X Studio FTW :-B

Exolent[jNr] 03-25-2010 12:41

Re: Do you use Pawn Studio?
 
Notepad++ with no highlighting.

Also, that code looks like it's written in VB

AntiBots 03-25-2010 12:47

Re: Do you use Pawn Studio?
 
I'm Using wxWidgets to create the IDE. :D

With Pawn Studio if I have large code they bug, an sometimes they close.


All times are GMT -4. The time now is 07:57.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.