GTA2 ScriptPad
Re: GTA2 ScriptPad
Still didn't answer my question. phh
Re: GTA2 ScriptPad
hmm for that i use "property edit", TSyntaxMemo? .o looks like delphi has good components built in
Re: GTA2 ScriptPad
HKEY_CURRENT_USER\Software\DMA Design Ltd\GTA2\Debug\scriptname isn't always written. I was wondering why scriptpad wasn't running my script even though in the scriptpad "use these" menu it had the right name.
Re: GTA2 ScriptPad
When I select "save as" the path gets set to c:\ in an open dialog instead of the last folder that I saved in or my GTA2 data folder.
Each time I open scriptpad, the gta2.exe name gets reset to "gta2" without the exe part and I have to find the exe again.
Each time I open scriptpad, the gta2.exe name gets reset to "gta2" without the exe part and I have to find the exe again.
-
- Immortal
- Posts: 889
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Re: GTA2 ScriptPad
If it worked we would use it.
GTA5 Race, DM & Capture | GTA2 Levels & Coding | GTA2 YouTube Videos
Gran Turismo 6 custom track club(Sign in with PSN details, then follow link again.)
Gran Turismo 6 custom track club(Sign in with PSN details, then follow link again.)
Re: GTA2 ScriptPad
If I set scriptpad to start with a template, when I try to open an existing .mis, it says "Do you want to save changes to existing.mis?" even though I didn't even open it yet. I assume it is asking me to save the untitled mis that I didn't actually change.
Re: GTA2 ScriptPad
Indeed Sektor, it saves to C:\ because it was hardcoded for Open and Save dialogs.
I shouldnt code at nights.
I will get to them after i get back to home.
I shouldnt code at nights.
I will get to them after i get back to home.
Always wear safety glasses while programming.
Re: GTA2 ScriptPad
Ok, fixed most of the problems reported by Sektor. It didnt wrote always the script name because the logic was wrong a bit, it saved info to HKLM for Vikes exe when it should have save it to HKCU for default 9.6 exe. That thing if it ask to save changes after using template script is actually not very wrong. Dunno if it should be option to choose from either ask to save or just ignore.
Sektor
How you noticed that gta2.exe gets to gta2?
I couldnt reproduce that bug.
EDIT
Get newest version from first post.
Should work better now as i also found some other bugs and possible crashes. Now it throws an error if you try to run unsaved script.
There is no point trying to compile not saved script.
Save first and then compile.
Etc, some other small things..
Sektor
How you noticed that gta2.exe gets to gta2?
I couldnt reproduce that bug.
EDIT
Get newest version from first post.
Should work better now as i also found some other bugs and possible crashes. Now it throws an error if you try to run unsaved script.
There is no point trying to compile not saved script.
Save first and then compile.
Etc, some other small things..
Always wear safety glasses while programming.
Re: GTA2 ScriptPad
Thanks. Now it pops up saying to save when I push F9 but it still launches GTA2 anyway. Previously it saved, compiled and then ran GTA2 which was quicker. Now I have to push ctrl+s and then push F9.
It's also not writing the HKCU registry keys, now even GMP and STY aren't being saved. I have Vike's exe set in the scrpad options.
It's also not writing the HKCU registry keys, now even GMP and STY aren't being saved. I have Vike's exe set in the scrpad options.
Re: GTA2 ScriptPad
But HKCU is not use by Vike exe? Or is it?
I thought that Vike uses HKLM for his things and dma uses HKCU.
Im confused now.
EDIT: it seems to ask GTA2 path again from me also, after pc turned off and on again.
Have to check why that happens.
EDIT2 Download again and see if that made any changes.
I thought that Vike uses HKLM for his things and dma uses HKCU.
Im confused now.
EDIT: it seems to ask GTA2 path again from me also, after pc turned off and on again.
Have to check why that happens.
EDIT2 Download again and see if that made any changes.
Always wear safety glasses while programming.
-
- Immortal
- Posts: 889
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Re: GTA2 ScriptPad
Other way round. Vike's GTA lets different users have different settings on the same computer.B-$hep wrote:I thought that Vike uses HKLM for his things and dma uses HKCU.
You could support both places for all settings which are relevant.
GTA5 Race, DM & Capture | GTA2 Levels & Coding | GTA2 YouTube Videos
Gran Turismo 6 custom track club(Sign in with PSN details, then follow link again.)
Gran Turismo 6 custom track club(Sign in with PSN details, then follow link again.)
Re: GTA2 ScriptPad
So i should save svg, gmp, sty, scr in both locations?
I dont use Vikes exe so i dont know nothing about it.
If i must guess all the things then it will take much longer to fix bugs
I dont use Vikes exe so i dont know nothing about it.
If i must guess all the things then it will take much longer to fix bugs
Always wear safety glasses while programming.
Re: GTA2 ScriptPad
Saving in both won't help with mixups since you still need to read from the correct location based on the user choice.
Vike = HKCU
Rockstar = HKLM
Vike = HKCU
Rockstar = HKLM
Re: GTA2 ScriptPad
Ok so i broke the code that was actually correct.
Great. Gtg fix it now.
I will work with that combobox only, based on the choice in settings dialog, i either read stuff from vikes reg settings or dma settings.
EDIT: first post updated! New upload.
Great. Gtg fix it now.
I will work with that combobox only, based on the choice in settings dialog, i either read stuff from vikes reg settings or dma settings.
EDIT: first post updated! New upload.
Always wear safety glasses while programming.
Re: GTA2 ScriptPad
How does scriptpad tell compiler.exe the filename to compile? Is it through a DLL? I'm curious what was changed between official miss2.exe and modified compiler.exe.
Re: GTA2 ScriptPad
You should ask JernejL what he did if he remembers.
Basically he faked the file opening with DLL or something like that.
I dont have sources atm near me, cant tell. But you have all his sources on your site.
Download the pack and mispad src should be there
Basically he faked the file opening with DLL or something like that.
I dont have sources atm near me, cant tell. But you have all his sources on your site.
Download the pack and mispad src should be there
Always wear safety glasses while programming.
Re: GTA2 ScriptPad
I have a vague memory that the filenames are stored in the registry
My GTA2 related projects:
Re: GTA2 ScriptPad
I compared the exe files and looked at the mispad source. miss2.exe was renamed to compiler.exe and hex edited to change comdlg32.dll to compiler.dll. That was the only important exe change. I don't think the source code to compiler.dll was included with mispad source (I could be wrong) but it wouldn't be much code since it just needs to return a filename.
sendmessage is used to "click" the compile/run parser menu item. getclassname and various winapi commands are used to read the listbox text.
I only looked into it because Logofero was asking for a command line compiler and I also think that would be useful.
compiler.dll reads filename from registry, mispad HKEY_CURRENT_USER\SOFTWARE\dnk development\gta2miscompilerdllhookfilename or scrpad HKEY_CURRENT_USER\SOFTWARE\BShep\ScriptPad\Settings\gta2miscompilerdllhookfilename (REG_SZ).
sendmessage is used to "click" the compile/run parser menu item. getclassname and various winapi commands are used to read the listbox text.
I only looked into it because Logofero was asking for a command line compiler and I also think that would be useful.
compiler.dll reads filename from registry, mispad HKEY_CURRENT_USER\SOFTWARE\dnk development\gta2miscompilerdllhookfilename or scrpad HKEY_CURRENT_USER\SOFTWARE\BShep\ScriptPad\Settings\gta2miscompilerdllhookfilename (REG_SZ).
Re: GTA2 ScriptPad
compiler.dll source is included.
How i could fix the long filenames bug then??
In my compiler, compiling from command line is supported.
Simplest way to go is probably create simple exe that calls miss2 and compiles the supplied script.
I.e you drop test.mis into that exe and it gets compiled.
I actually did such app. But im not sure if i have the src with me on my usb stick atm.
Im not home.
I will take a look.
How i could fix the long filenames bug then??
In my compiler, compiling from command line is supported.
Simplest way to go is probably create simple exe that calls miss2 and compiles the supplied script.
I.e you drop test.mis into that exe and it gets compiled.
I actually did such app. But im not sure if i have the src with me on my usb stick atm.
Im not home.
I will take a look.
Always wear safety glasses while programming.