PDA

View Full Version : Do you use Pawn Studio?


minimiller
03-24-2010, 10:45
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 (http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe)

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:

$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

Credits:

-Kreation (http://forums.alliedmods.net/member.php?u=68427): Due to crazy and annoying control panel settings, left click wouldnt work properly

Hf <3

Arkshine
03-24-2010, 12:13
Pawn studio is buggy as hell.

AntiBots
03-24-2010, 12:26
I am creating my Own IDE. :P

If I finish I will release it.

Kreation
03-24-2010, 15:56
ill whack it here anyway

LOL

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

fysiks
03-24-2010, 17:58
Notepad++ FTW.

ehha
03-24-2010, 19:16
Personally I hate pawn studio, if there was no n++ I'd use amxx studio.

Notepad++ FTW.
Thanks to you! :up:

minimiller
03-24-2010, 19:20
i love the syntax highlighting of ps
n++ looks too weird to me :?

Bugsy
03-25-2010, 08:40
AMX Mod X Studio FTW :-B

Exolent[jNr]
03-25-2010, 12:41
Notepad++ with no highlighting.

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

AntiBots
03-25-2010, 12:47
I'm Using wxWidgets (http://www.wxwidgets.org/) to create the IDE. :D

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

minimiller
03-25-2010, 18:04
;1128400']
Also, that code looks like it's written in VB


And you would be pretty much correct =]

With the release of Version 3, the syntax of AutoIt has been restructured to be more like the BASIC family of languages

Seta00
03-26-2010, 09:51
wxWidgets (http://www.wxwidgets.org/)

:D:D:D:D:D:D:D:D:D:D

wx rulz, if you face any problem, feel free to ask me.

AntiBots
03-26-2010, 21:22
:D:D:D:D:D:D:D:D:D

wx rulz, if you face any problem, feel free to ask me.

Thanks. Yes I am also using wxFormBuilder!! :wink:

joropito
03-27-2010, 00:15
I don't use Pawn Studio or N++.
I prefer to use vi (http://en.wikipedia.org/wiki/Vi)... of course with colours disabled.

fysiks
03-27-2010, 00:44
I prefer to use vi (http://en.wikipedia.org/wiki/Vi)... of course with colours disabled.

Do you use it in a shell on Linux?

joropito
03-27-2010, 08:30
Do you use it in a shell on Linux?

Of course. I develop remotely on my unix box.

EDIT:

I you want a windows version http://portablegvim.sourceforge.net/.
I've used it a long time ago.

fysiks
03-27-2010, 12:38
Of course. I develop remotely on my unix box.

EDIT:

I you want a windows version http://portablegvim.sourceforge.net/.
I've used it a long time ago.

I tried to use the Windows version before and didn't like it. I'm hooked on Notepad++ but if I do it remotely through PuTTY I use VI obviously :).

Seta00
03-27-2010, 14:43
IMO, Emacs > VI

joropito
03-27-2010, 18:12
IMO, Emacs > VI

I never used Emacs. Vi rules!

vi > vim :P

Hawk552
03-30-2010, 20:38
IMO, Emacs > VI

Do you have 12 fingers?

Lure.d
03-31-2010, 06:02
AMX Mod X Studio FTW :-B

Same here :D

Seta00
04-01-2010, 21:54
Do you have 12 fingers?

:mrgreen::mrgreen::mrgreen::mrgreen:

Took me a month to get used to it, but after that, it rocks =D

wrecked_
04-02-2010, 00:15
AMX Mod X Studio FTW :-B
Same here :D
*shudder*

Notepad++ with fysiks' orgasmic bold green highlighting on constants.

minimiller
04-02-2010, 08:21
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

Seta00
04-02-2010, 10:23
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:

joropito
04-02-2010, 11:32
I've tried n++ highlighting and didn't worked for me...

I'm happy with my old terminal emulation editor ;)

NiQu
04-03-2010, 19:50
Pawn studio is buggy as hell.
What kind of bugs does it have? Ive used it for quite a long time and have the only thing i have noticed is the random crashes.

minimiller
04-03-2010, 22:18
Well, then just change it on the XML file.

EDIT: Here ya go, Notepad++ highlighting with Pawn Studio colors:

aww no way
your a fucking hero son
if karma was still here, i would attempt to break it with epic overload
<333333333333333333333333333333333333333333333 333333333

Seta00
04-03-2010, 22:26
aww no way
your a fucking hero son
if karma was still here, i would attempt to break it with epic overload
<333333333333333333333333333333333333333333333 333333333

Your post made me overcome the sudden sadness I felt from Hawk's opinion about me being an idiot :mrgreen::mrgreen:

r14170
04-05-2010, 09:50
idk about you but my PawnStudio has never crashed .. i still love it :D

Kreation
04-07-2010, 16:43
I don't like AMXX Studio or Pawn Studio, the tabs look too big.