Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Delphi To Fasm

Featured Replies

Posted
  Function GetAppDataPath:String;
Var
Test:Array[1..255] Of Char;
Begin
FillChar(Test,SizeOf(Test),Ord(' '));
SHGetSpecialFolderPath(Application.Handle,@Test,CSIDL_APPDATA,False);
Result:=Trim(Test);
End;Path:=GetAppDataPath+'\mypath\txt.txt';

Try this:

  CALL GetStartupInfoA
POP EAX
POP EAX
POP EAX
POP EAX

Now the full programs path together with name is loaded in EAX..

Path:=GetAppDataPath+'\mypath\txt.txt';

rip the parts you need as I did ;)

; DialogBox exampleformat PE GUI 4.0
entry start
include 'put your path here\INCLUDE\WIN32ax.INC'
include 'put your path here\INCLUDE\MACRO\MASM.INC'
include 'put your path here\INCLUDE\MACRO\PROC32.INC'
include 'put your path here\INCLUDE\API\SHELL32.INC'
ID_MESSAGE = 102
CSIDL_APPDATA equ 1ahsection '.data' data readable writeable
flags dd ?
caption rb 40h
message rb 100h
rbuf rb MAX_PATH
fn db '\mypath\txt.txt',0
section '.code' code readable executable start:
invoke GetModuleHandle,0
invoke DialogBoxParam,eax,37,HWND_DESKTOP,DialogProc,0
or eax,eax
jz exit
invoke MessageBox,HWND_DESKTOP,message,caption,[flags]
exit:
invoke ExitProcess,0proc DialogProc hwnddlg,msg,wparam,lparam
push ebx esi edi
cmp [msg],WM_INITDIALOG
je .wminitdialog
cmp [msg],WM_COMMAND
je .wmcommand
cmp [msg],WM_CLOSE
je .wmclose
xor eax,eax
jmp .finish
.wminitdialog:
jmp .processed
.wmcommand:
cmp [wparam],BN_CLICKED shl 16 + IDOK
jne .processed invoke SHGetSpecialFolderPathA,[hwnddlg],rbuf,CSIDL_APPDATA,FALSE
invoke lstrcatA,rbuf,fn
invoke SetDlgItemText,[hwnddlg],ID_MESSAGE, rbuf .failed:
jmp .processed
.wmclose:
invoke EndDialog,[hwnddlg],0
.processed:
mov eax,1
.finish:
pop edi esi ebx
ret
endpsection '.idata' import data readable writeable library kernel,'KERNEL32.DLL',\
user,'USER32.DLL',\
shell,'SHELL32.DLL'
import kernel,\
GetModuleHandle,'GetModuleHandleA',\
lstrcatA,'lstrcatA',\
ExitProcess,'ExitProcess'
import user,\
DialogBoxParam,'DialogBoxParamA',\
SetDlgItemText,'SetDlgItemTextA',\
MessageBox,'MessageBoxA',\
EndDialog,'EndDialog' import shell,\
SHGetSpecialFolderPathA,'SHGetSpecialFolderPathA'section '.rsrc' resource data readable directory RT_DIALOG,dialogs resource dialogs,\
37,LANG_ENGLISH+SUBLANG_DEFAULT,demonstration dialog demonstration,'SHGetSpecialFolderPathA',70,70,190,65,WS_CAPTION+WS_POPUP+WS_SYSMENU+DS_MODALFRAME
dialogitem 'EDIT','',ID_MESSAGE,10,10,170,13,WS_VISIBLE+WS_BORDER+WS_TABSTOP+ES_AUTOHSCROLL
dialogitem 'BUTTON','OK',IDOK,10,30,45,15,WS_VISIBLE+WS_TABSTOP+BS_DEFPUSHBUTTON
enddialog
  • Author

Addict

Super! It is impossible to transfer my happiness! :D

Many thanks!

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.